Skip to content
Permalink
Browse files

[Sources] [RSKImageCropViewController] [cropRect] Restore `imageScrol…

…lView.contentOffset` after calculations.

Fixes #212.
  • Loading branch information...
ruslanskorb committed Jul 24, 2019
1 parent 823f134 commit 3cf95329761b248e3ea10df01cf725895993fefa
Showing with 2 additions and 0 deletions.
  1. +2 −0 RSKImageCropper/RSKImageCropViewController.m
@@ -448,6 +448,7 @@ - (CGRect)cropRect
CGAffineTransform imageScrollViewTransform = self.imageScrollView.transform;
self.imageScrollView.transform = CGAffineTransformIdentity;

CGPoint imageScrollViewContentOffset = self.imageScrollView.contentOffset;
CGRect imageScrollViewFrame = self.imageScrollView.frame;
self.imageScrollView.frame = self.maskRect;

@@ -485,6 +486,7 @@ - (CGRect)cropRect
cropRect = CGRectApplyAffineTransform(cropRect, CGAffineTransformMakeScale(imageScale, imageScale));

self.imageScrollView.frame = imageScrollViewFrame;
self.imageScrollView.contentOffset = imageScrollViewContentOffset;
self.imageScrollView.transform = imageScrollViewTransform;

return cropRect;

0 comments on commit 3cf9532

Please sign in to comment.
You can’t perform that action at this time.