views:

66

answers:

1

Questions similar to this have been asked all over, but I haven't been able to find a solution to my specific problem, so here goes.

I have a UIViewController with a UIScrollView in its view. Within the scrollview, I have a number of regular uiview subviews. I want to be able to detect whether the scrollview swipe was with one or two fingers, and to cancel the scroll and call some other method in one of those cases. Can anyone help me with this?

+1  A: 

If you are on OS 3.2 + try giving UIGestureRecognizer a try. You can detect swipes of any number of fingers very easily.

http://developer.apple.com/iphone/library/documentation/uikit/reference/UIGestureRecognizer_Class/Reference/Reference.html

pabloruiz55
What you said seems to be the solution I'm looking for, the only problem is that the gesture is never called if the number of swipes required is larger than one. And yes, I have made sure that multipleTouchEnabled is set to YES. I'm been bashing my brain trying to find an answer.
Dyldo42