IKImage 手势缩放旋转



在我的应用程序中,我使用IKImageview预览图像,默认情况下它支持两个手指手势,如向上,向下,向左,向右移动。现在我想添加旋转和缩放手势,有人有什么好主意吗?谢谢。

有谁知道如何子类化 IKImageview 以支持缩放手势?

终于想通了。只需对IKImageView进行子类化并添加:

- (void)rotateWithEvent:(NSEvent *)event{
    [self setFrameCenterRotation:([self frameCenterRotation] + [event rotation])];
}

问题解决了!

最新更新