---
title: UIPanGestureRecognizer
framework: uikit
role: symbol
role_heading: Class
path: uikit/uipangesturerecognizer
---

# UIPanGestureRecognizer

A continuous gesture recognizer that interprets panning gestures.

## Declaration

```swift
@MainActor class UIPanGestureRecognizer
```

## Mentioned in

Handling pan gestures

## Overview

Overview UIPanGestureRecognizer is a concrete subclass of UIGestureRecognizer. Clients of this class can, in their action methods, query the UIPanGestureRecognizer object for the current translation of the gesture (translation(in:)) and the velocity of the translation (velocity(in:)). They can specify a view’s coordinate system to use for the translation and velocity values. Clients can also reset the translation to a desired value. A panning gesture is continuous. The user must press one or more fingers on a view while panning it. The gesture begins (UIGestureRecognizer.State.began) when the user moves the minimum number of fingers allowed (minimumNumberOfTouches) enough distance for recognition as a pan. It changes (UIGestureRecognizer.State.changed) when the user moves a finger while pressing with the minimum number of fingers. It ends (UIGestureRecognizer.State.ended) when the user lifts all fingers.

## Topics

### Configuring the gesture recognizer

- [maximumNumberOfTouches](uikit/uipangesturerecognizer/maximumnumberoftouches.md)
- [minimumNumberOfTouches](uikit/uipangesturerecognizer/minimumnumberoftouches.md)

### Tracking the location and velocity of the gesture

- [translation(in:)](uikit/uipangesturerecognizer/translation(in:).md)
- [setTranslation(_:in:)](uikit/uipangesturerecognizer/settranslation(_:in:).md)
- [velocity(in:)](uikit/uipangesturerecognizer/velocity(in:).md)

### Tracking scroll events

- [allowedScrollTypesMask](uikit/uipangesturerecognizer/allowedscrolltypesmask.md)
- [UIScrollTypeMask](uikit/uiscrolltypemask.md)
- [UIScrollType](uikit/uiscrolltype.md)

## Relationships

### Inherits From

- [UIGestureRecognizer](uikit/uigesturerecognizer.md)

### Inherited By

- [UIScreenEdgePanGestureRecognizer](uikit/uiscreenedgepangesturerecognizer.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Standard gestures

- [Handling UIKit gestures](uikit/handling-uikit-gestures.md)
- [Coordinating multiple gesture recognizers](uikit/coordinating-multiple-gesture-recognizers.md)
- [Adopting hover support for Apple Pencil](uikit/adopting-hover-support-for-apple-pencil.md)
- [Supporting gesture interaction in your apps](uikit/supporting-gesture-interaction-in-your-apps.md)
- [UIHoverGestureRecognizer](uikit/uihovergesturerecognizer.md)
- [UILongPressGestureRecognizer](uikit/uilongpressgesturerecognizer.md)
- [UIPinchGestureRecognizer](uikit/uipinchgesturerecognizer.md)
- [UIRotationGestureRecognizer](uikit/uirotationgesturerecognizer.md)
- [UIScreenEdgePanGestureRecognizer](uikit/uiscreenedgepangesturerecognizer.md)
- [UISwipeGestureRecognizer](uikit/uiswipegesturerecognizer.md)
- [UITapGestureRecognizer](uikit/uitapgesturerecognizer.md)
