A concrete subclass of
UIGestureRecognizer that looks for pinching gestures involving two touches.
- iOS 3.2+
- Mac Catalyst 13.0+Beta
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 two touches have moved enough to be considered a pinch gesture. The gesture changes (
UIGestureRecognizer.State.changed) when a finger moves (with both fingers remaining pressed). The gesture ends (
UIGestureRecognizer.State.ended) when both fingers lift from the view.
Interpreting the Pinching Gesture
var scale: CGFloat
The scale factor relative to the points of the two touches in screen coordinates.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software