A discrete gesture recognizer that interprets long-press gestures.
- iOS 3.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
UILong is a concrete subclass of
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.
Long-press gestures are continuous. The gesture begins (
UIGesture) when the user presses the number of allowable fingers (
number) for the specified period (
minimum) and the touches do not move beyond the allowable range of movement (
allowable). The gesture recognizer transitions to the Change state whenever a finger moves, and it ends (
UIGesture) when the user lifts any of the fingers.