iOS provides UIGestureRecognizer class which is anabstract 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.
Liked By
Write Answer
Describe UIPanGestureRecognizer?
Join MindStick Community
You have need login or register for voting of answers or question.
Tarun Kumar
21-Jan-2016To 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.