Commit 836e6dc2 authored by RayJiang's avatar RayJiang

修复iOS13裁剪错误的问题

parent 8a652a57
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
UIButton *_settingBtn; UIButton *_settingBtn;
BOOL _pushPhotoPickerVc; BOOL _pushPhotoPickerVc;
BOOL _didPushPhotoPickerVc; BOOL _didPushPhotoPickerVc;
CGRect _cropRect;
UIButton *_progressHUD; UIButton *_progressHUD;
UIView *_HUDContainer; UIView *_HUDContainer;
...@@ -493,6 +494,18 @@ ...@@ -493,6 +494,18 @@
_cropRectLandscape = CGRectMake((self.view.tz_height - widthHeight) / 2, cropRect.origin.x, widthHeight, widthHeight); _cropRectLandscape = CGRectMake((self.view.tz_height - widthHeight) / 2, cropRect.origin.x, widthHeight, widthHeight);
} }
- (CGRect)cropRect {
CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
BOOL isFullScreen = self.view.tz_height == screenHeight;
if (isFullScreen) {
return _cropRect;
} else {
CGRect newCropRect = _cropRect;
newCropRect.origin.y -= ((screenHeight - self.view.tz_height) / 2);
return newCropRect;
}
}
- (void)setTimeout:(NSInteger)timeout { - (void)setTimeout:(NSInteger)timeout {
_timeout = timeout; _timeout = timeout;
if (timeout < 5) { if (timeout < 5) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment