|
@@ -486,7 +486,6 @@ CGFloat const PanoramaGuideViewWOrH = 120;
|
|
|
self.offSetLeft = @((120-38)/2);
|
|
|
}
|
|
|
|
|
|
- // UIImage *resultImage = [self showDir:dir image:image];
|
|
|
self.showImageView.image = image;
|
|
|
[UIView animateWithDuration:.15 animations:^{
|
|
|
switch (self.currentDirection) {
|
|
@@ -497,9 +496,8 @@ CGFloat const PanoramaGuideViewWOrH = 120;
|
|
|
make.left.right.bottom.mas_equalTo(0);
|
|
|
}];
|
|
|
[self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.bottom.offset(-imageWH);
|
|
|
+ make.bottom.mas_offset(-imageWH);
|
|
|
make.left.mas_equalTo(self.offSetLeft.doubleValue);
|
|
|
-// make.centerX.mas_equalTo(self);
|
|
|
}];
|
|
|
}
|
|
|
break;
|
|
@@ -510,8 +508,7 @@ CGFloat const PanoramaGuideViewWOrH = 120;
|
|
|
make.height.mas_lessThanOrEqualTo(self);
|
|
|
}];
|
|
|
[self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.top.offset(imageWH);
|
|
|
-// make.centerX.mas_equalTo(self);
|
|
|
+ make.top.mas_offset(imageWH);
|
|
|
make.left.mas_equalTo(self.offSetLeft.doubleValue);
|
|
|
|
|
|
}];
|
|
@@ -526,8 +523,7 @@ CGFloat const PanoramaGuideViewWOrH = 120;
|
|
|
}];
|
|
|
|
|
|
[self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.right.offset(-imageWH);
|
|
|
-// make.centerY.mas_equalTo(self);
|
|
|
+ make.right.mas_offset(-imageWH);
|
|
|
make.top.mas_equalTo(self.offSetTop.doubleValue);
|
|
|
|
|
|
}];
|
|
@@ -542,8 +538,7 @@ CGFloat const PanoramaGuideViewWOrH = 120;
|
|
|
}];
|
|
|
|
|
|
[self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.offset(imageWH);
|
|
|
-// make.centerY.mas_equalTo(self);
|
|
|
+ make.left.mas_offset(imageWH);
|
|
|
make.top.mas_equalTo(self.offSetTop.doubleValue);
|
|
|
|
|
|
}];
|
|
@@ -570,109 +565,25 @@ CGFloat const PanoramaGuideViewWOrH = 120;
|
|
|
if (!self.showImageView.image) {
|
|
|
return;
|
|
|
}
|
|
|
- CGFloat imageWidth = self.showImageView.image.size.width;
|
|
|
- CGFloat imageHight = self.showImageView.image.size.height;
|
|
|
if (dir == PanoramaOrientationViewDown || dir == PanoramaOrientationViewUp) {
|
|
|
if (arrowDir == PanoramaArrowDirCenter) {
|
|
|
self.offSetLeft = @((120-38)/2);
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.bottom.offset(-(PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-//// make.centerX.mas_equalTo(self);
|
|
|
-// make.left.mas_offset(self.offSetLeft.doubleValue);
|
|
|
-// }];
|
|
|
} else if (arrowDir == PanoramaArrowDirLeft) {
|
|
|
self.offSetLeft = @(0);
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.bottom.offset(-(PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-//// make.left.mas_equalTo(self).mas_offset(10);
|
|
|
-// make.left.mas_offset(self.offSetLeft.doubleValue);
|
|
|
-//
|
|
|
-// }];
|
|
|
} else if (arrowDir == PanoramaArrowDirRight) {
|
|
|
self.offSetLeft = @(120-38);
|
|
|
-
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.bottom.offset(-(PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-//// make.right.mas_equalTo(self).mas_offset(-10);
|
|
|
-// make.left.mas_offset(self.offSetLeft.doubleValue);
|
|
|
-//
|
|
|
-// }];
|
|
|
}
|
|
|
}
|
|
|
-// else if (dir == PanoramaOrientationViewUp) {
|
|
|
-// if (arrowDir == PanoramaArrowDirCenter) {
|
|
|
-// self.offSetTop = @((120-38)/2);
|
|
|
-//
|
|
|
-//// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-//// make.top.offset((PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-////// make.centerX.mas_equalTo(self);
|
|
|
-//// make.top.mas_offset(self.offSetTop.doubleValue);
|
|
|
-//// }];
|
|
|
-// } else if (arrowDir == PanoramaArrowDirLeft) {
|
|
|
-// self.offSetTop = @((120-38)/2);
|
|
|
-//
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.top.offset((PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-// make.left.mas_equalTo(self).mas_offset(10);
|
|
|
-// }];
|
|
|
-// } else if (arrowDir == PanoramaArrowDirRight) {
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.top.offset((PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-// make.right.mas_equalTo(self).mas_offset(-10);
|
|
|
-// }];
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
else if (dir == PanoramaOrientationViewLeft || dir == PanoramaOrientationViewRight) {
|
|
|
if (arrowDir == PanoramaArrowDirCenter) {
|
|
|
self.offSetTop = @((120-38)/2);
|
|
|
-//
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.left.offset((PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-//// make.centerY.mas_equalTo(self);
|
|
|
-// make.top.mas_offset(self.offSetTop.doubleValue);
|
|
|
-//
|
|
|
-// }];
|
|
|
} else if (arrowDir == PanoramaArrowDirUp) {
|
|
|
self.offSetTop = @(0);
|
|
|
-
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.left.offset((PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-//// make.top.mas_equalTo(self).mas_offset(10);
|
|
|
-// make.top.mas_offset(self.offSetTop.doubleValue);
|
|
|
-//
|
|
|
-// }];
|
|
|
} else if (arrowDir == PanoramaArrowDirDown) {
|
|
|
self.offSetTop = @(120-38);
|
|
|
-
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.left.offset((PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-//// make.bottom.mas_equalTo(self).mas_offset(-10);
|
|
|
-// make.top.mas_offset(self.offSetTop.doubleValue);
|
|
|
-//
|
|
|
-// }];
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-// else if (dir == PanoramaOrientationViewRight) {
|
|
|
-// if (arrowDir == PanoramaArrowDirCenter) {
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.left.offset((PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-// make.centerY.mas_equalTo(self);
|
|
|
-// }];
|
|
|
-// } else if (arrowDir == PanoramaArrowDirUp) {
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.left.offset((PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-// make.top.mas_equalTo(self).mas_offset(10);
|
|
|
-// }];
|
|
|
-// } else if (arrowDir == PanoramaArrowDirDown) {
|
|
|
-// [self.whiteArrow mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.right.offset(-(PanoramaGuideViewWOrH * imageWidth)/imageHight);
|
|
|
-// make.bottom.mas_equalTo(self).mas_offset(-10);
|
|
|
-// }];
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
});
|
|
|
}
|
|
|
|