UIPinchGestureRecognizer
A continuous gesture recognizer that interprets pinching gestures involving two touches.
Declaration
@MainActor class UIPinchGestureRecognizerMentioned in
Overview
UIPinchGestureRecognizer is a concrete subclass of UIGestureRecognizer.
The user must press two fingers on a view while pinching it. When the user moves the two fingers toward each other, the conventional meaning is zoom out; when the user moves the two fingers away from each other, the conventional meaning is zoom in.
Pinching is a continuous gesture. The gesture begins (UIGestureRecognizer.State.began) when the user moves the two fingers enough to create a pinch gesture. The gesture changes (UIGestureRecognizer.State.changed) when a finger moves (while both fingers remain touching). The gesture ends (UIGestureRecognizer.State.ended) when the user lifts both fingers from the view.
Topics
Interpreting the pinching gesture
See Also
Standard gestures
Handling UIKit gesturesCoordinating multiple gesture recognizersAdopting hover support for Apple PencilSupporting gesture interaction in your appsUIHoverGestureRecognizerUILongPressGestureRecognizerUIPanGestureRecognizerUIRotationGestureRecognizerUIScreenEdgePanGestureRecognizerUISwipeGestureRecognizerUITapGestureRecognizer