Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我使用 IKImageview 预览图像,默认情况下它支持两个手指手势,例如向上、向下、向左、向右移动。现在我想为其添加旋转和缩放手势,有人有什么好主意吗?非常感谢。
有谁知道如何继承 IKImageview 以支持缩放手势?
Finally figure it out. Just subclass the IKImageView and add:
IKImageView
- (void)rotateWithEvent:(NSEvent *)event{ [self setFrameCenterRotation:([self frameCenterRotation] + [event rotation])]; }
Problem solved!