문제

In my application I use IKImageview to preview a image,and by default it supports two finger gestures like moving up,down,left,right. Now I want to add rotate and zoom gestures to it ,does anyone has any good ideas? Thank you very much.

does anyone know how to subclass IKImageview to support zoom gesture?

도움이 되었습니까?

해결책

Finally figure it out. Just subclass the IKImageView and add:

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

Problem solved!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top