Dyldo42
Dyldo42

Reputation: 2348

Detect number of fingers in UIScrollView swipe

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?

Upvotes: 0

Views: 465

Answers (1)

pabloruiz55
pabloruiz55

Reputation: 1306

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

Upvotes: 1

Related Questions