开发者

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 wit开发者_如何学Goh this?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜