diff --git a/Example/RSKImageCropperExample/RSKImageCropperExample-Info.plist b/Example/RSKImageCropperExample/RSKImageCropperExample-Info.plist index f31df5d..6c57fc6 100755 --- a/Example/RSKImageCropperExample/RSKImageCropperExample-Info.plist +++ b/Example/RSKImageCropperExample/RSKImageCropperExample-Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.2.0 + 1.2.1 CFBundleSignature ???? CFBundleVersion diff --git a/RSKImageCropper.podspec b/RSKImageCropper.podspec index 97e4e8c..411398a 100644 --- a/RSKImageCropper.podspec +++ b/RSKImageCropper.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'RSKImageCropper' - s.version = '1.2.0' + s.version = '1.2.1' s.summary = 'An image cropper for iOS like in the Contacts app with support for landscape orientation.' s.homepage = 'https://github.com/ruslanskorb/RSKImageCropper' s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/RSKImageCropper/RSKImageCropViewController+Protected.h b/RSKImageCropper/RSKImageCropViewController+Protected.h index 28d1194..89c07fb 100644 --- a/RSKImageCropper/RSKImageCropViewController+Protected.h +++ b/RSKImageCropper/RSKImageCropViewController+Protected.h @@ -22,7 +22,12 @@ // THE SOFTWARE. // -@interface RSKImageCropViewController (Protected) +/** + The methods in the RSKImageCropViewControllerProtectedMethods category + typically should only be called by subclasses which are implementing new + image crop view controllers. They may be overridden but must call super. + */ +@interface RSKImageCropViewController (RSKImageCropViewControllerProtectedMethods) /** Asynchronously crops the original image in accordance with the current settings and tells the delegate that the original image will be / has been cropped. diff --git a/RSKImageCropper/RSKImageCropViewController.m b/RSKImageCropper/RSKImageCropViewController.m index 520023e..244e7d5 100644 --- a/RSKImageCropper/RSKImageCropViewController.m +++ b/RSKImageCropper/RSKImageCropViewController.m @@ -473,7 +473,7 @@ - (void)handleRotation:(UIRotationGestureRecognizer *)gestureRecognizer - (BOOL)isPortraitInterfaceOrientation { - return CGRectGetHeight(self.view.frame) > CGRectGetWidth(self.view.frame); + return CGRectGetHeight(self.view.bounds) > CGRectGetWidth(self.view.bounds); } #pragma mark - Private @@ -677,8 +677,8 @@ - (void)updateMaskRect { switch (self.cropMode) { case RSKImageCropModeCircle: { - CGFloat viewWidth = CGRectGetWidth(self.view.frame); - CGFloat viewHeight = CGRectGetHeight(self.view.frame); + CGFloat viewWidth = CGRectGetWidth(self.view.bounds); + CGFloat viewHeight = CGRectGetHeight(self.view.bounds); CGFloat diameter; if ([self isPortraitInterfaceOrientation]) { @@ -696,8 +696,8 @@ - (void)updateMaskRect break; } case RSKImageCropModeSquare: { - CGFloat viewWidth = CGRectGetWidth(self.view.frame); - CGFloat viewHeight = CGRectGetHeight(self.view.frame); + CGFloat viewWidth = CGRectGetWidth(self.view.bounds); + CGFloat viewHeight = CGRectGetHeight(self.view.bounds); CGFloat length; if ([self isPortraitInterfaceOrientation]) {