<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UILongPressGestureRecognizer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UILongPressGestureRecognizer"
  },
  "title" : "UILongPressGestureRecognizer"
}
-->

# UILongPressGestureRecognizer

A continuous gesture recognizer that interprets long-press gestures.

```
@MainActor class UILongPressGestureRecognizer
```

## Overview

[`UILongPressGestureRecognizer`](/documentation/UIKit/UILongPressGestureRecognizer) is a concrete subclass of [`UIGestureRecognizer`](/documentation/UIKit/UIGestureRecognizer).

The user must press one or more fingers on a view and hold them there for a minimum period of time before the action triggers. While down, the userʼs fingers canʼt move more than a specified distance or the gesture fails.

A long-press gesture is continuous. The gesture begins ([`UIGestureRecognizer.State.began`](/documentation/UIKit/UIGestureRecognizer/State-swift.enum/began)) when the user presses the number of allowable fingers ([`numberOfTouchesRequired`](/documentation/UIKit/UILongPressGestureRecognizer/numberOfTouchesRequired)) for the specified period ([`minimumPressDuration`](/documentation/UIKit/UILongPressGestureRecognizer/minimumPressDuration)) and the touches don’t move beyond the allowable range of movement ([`allowableMovement`](/documentation/UIKit/UILongPressGestureRecognizer/allowableMovement)). The gesture recognizer transitions to the Change state whenever a finger moves, and it ends ([`UIGestureRecognizer.State.ended`](/documentation/UIKit/UIGestureRecognizer/State-swift.enum/ended)) when the user lifts any of the fingers.

## Topics

### Configuring the gesture recognizer

[`minimumPressDuration`](/documentation/UIKit/UILongPressGestureRecognizer/minimumPressDuration)

The minimum time that the user must press on the view for the gesture to be recognized.

[`numberOfTouchesRequired`](/documentation/UIKit/UILongPressGestureRecognizer/numberOfTouchesRequired)

The number of fingers that must touch the view for gesture recognition.

[`numberOfTapsRequired`](/documentation/UIKit/UILongPressGestureRecognizer/numberOfTapsRequired)

The number of taps on the view necessary for gesture recognition.

[`allowableMovement`](/documentation/UIKit/UILongPressGestureRecognizer/allowableMovement)

The maximum movement of the fingers on the view before the gesture fails.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)