Skip to content

Commit

Permalink
Merge pull request #60 from ruslanskorb/develop
Browse files Browse the repository at this point in the history
Version 1.2.1
  • Loading branch information
ruslanskorb committed Jul 8, 2015
2 parents 1b6d921 + 831669a commit 8ede6f2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<string>1.2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion RSKImageCropper.podspec
Original file line number Diff line number Diff line change
@@ -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' }
Expand Down
7 changes: 6 additions & 1 deletion RSKImageCropper/RSKImageCropViewController+Protected.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions RSKImageCropper/RSKImageCropViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]) {
Expand All @@ -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]) {
Expand Down

0 comments on commit 8ede6f2

Please sign in to comment.