Monday, May 14, 2012

How to detect Swipe Gesture in iPhone SDK?


In my iPhone app, I require to recognize the swipe gesture made by the user on the view.



I want the swipe gestures to be recognized and perform a function on swipe.



I need that the view should horizontally slide and show another view as a user makes a swipe gesture.



What needs to be done?



How do I recognize it?



Any directions or tutorials will be really appreciated.


Source: Tips4all

2 comments:

  1. Use the UISwipeGestureRecognizer. Not much else to say really, gesture recognizers are easy. There are WWDC10 videos on the subject even. Sessions 120 and 121. :)

    ReplyDelete
  2. theres apple documentation and sample for swipe recognition refer below link;

    http://developer.apple.com/library/ios/#samplecode/SimpleGestureRecognizers/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009460

    ReplyDelete