---
title: "Describe UIPanGestureRecognizer?"  
description: "Describe UIPanGestureRecognizer?"  
author: "Tarun Kumar"  
published: 2016-01-21  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/22974/describe-uipangesturerecognizer  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 2 minutes  

---

# Describe UIPanGestureRecognizer?

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.

## Answers

### Answer by Tarun Kumar

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.


---

Original Source: https://www.mindstick.com/interview/22974/describe-uipangesturerecognizer

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
