I have the current code to enlarge UIImageView:
- (void)handlePinch:(UIPinchGestureRecognizer *)pinchGestureRecognizer
{
mCurrentScale += [pinchGestureRecognizer scale] - mLastScale;
mLastScale = [pinchGestureRecognizer scale];
if (pinchGestureRecognizer.state == UIGestureRecognizerStateEnded)
{
mLastScale = 1.0;
}
CGAffineTransform currentTransform = CGAffineTransformIdentity;
CGAffineTransform newTransform = CGAffineTransformScale(currentTransform, mCurrentScale, mCurrentScale);
thumbView.transform = newTransform;
}
Image is located in right corner and if I enlarge half of image gores out of View, how can I enlarge image in that way it stays in right corner and shown properly?