我有放大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;
}
图像位于右上角,如果我将一半的图像边缘放大到视图之外,如何以这种方式放大图像,使其保持在右上角并正确显示?
答案 0 :(得分:0)
使用CGAffineTransformTranslate在缩放时向左移动?