Home > DeveloperSection > Interviews > Describe UIPanGestureRecognizer?

Posted on    January-21-2016 12:34 AM

 iPhone iPhone  Ios  Objective C 
Ratings:
 1 Answer(s)
  321  View(s)
Rate this:

Tarun Kumar

Total Post:107

Points:535
Posted on    January-21-2016 1:34 AM

iOS provides UIGestureRecognizer class which is an abstract base class. It has many concrete gesture-recognizer classes. UIPanGestureRecognizer is one of the concrete sub-class of UIGestureRecognizer abstract class. UIPanGestureRecognizer class is used to enable dragging or panning gestures, the user must be press one or more fingers on a view while they pan it.
To use functionalities of UIPanGestureRecognizer client must implement the action methods of the gesture recognizer. It will ask for the current translation and velocity of the gesture.
Some action methods are as follows :
1. UIGestureRecognizerStateBegan : it will recognize the beggining state of fingure touch.
2. UIGestureRecognizerStateChanged : it will recognize the fingers moving state while at least the minimum number of fingers are pressed down.
3. UIGestureRecognizerStateEnded : it will recognize the fingers lifted state on the view or we can say that it will ends the finger recognition.
If you want to fix the no of fingers allowed on the view, then use minimumNumberOfTouches method.

Modified On Jan-21-2016 12:37:19 AM

Don't want to miss updates? Please click the below button!

Follow MindStick