iphone - How to implement the traditional imageView-inside-a-scrollView pan gesture with two fingers instead of one? -
I have a scroll view image that allows me to see an image that is nested inside, pinch to zoom, and if I'm zooming in enough to pan around using a custom GestureRecognizer, I override the default behavior of a finger pan so that it does something other than the pan (according to the person's request I create this app for I am). It works perfectly. The problem now is that I still need the ability to pan around the image I could do with a finger pan, I just need to have it with two fingers now. Is there a solution to use the already available features of nested image views? Or do I need to go through and get recognized after two finger gestures, write my own custom all argument? Any ideas here are greatly appreciated! Thank you Newer versions if you have only the 'default' parameters of UIPanGenstureRecognizer Adjust that the scrollview is already associated with Behavior should be taken to 2 finger level
(UIGestureRecognizer * gestureObj in scrollView.gestureRecognizers) {if ([gestureObj isKindOfClass: [UIPanGestureRecognizer class]]) {UIPanGestureRecognizer * PanObj = (UIPanGestureRecognizer *) gestureObj; PanObj.minimumNumberTouch = 2; PanObj.maximumNumberOfTouches = 2; }}
Comments
Post a Comment