Class

UIPinchGestureRecognizer

A concrete subclass of UIGestureRecognizer that looks for pinching gestures involving two touches.

Declaration

@interface UIPinchGestureRecognizer : UIGestureRecognizer

Overview

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 (UIGestureRecognizerStateBegan) when the two touches have moved enough to be considered a pinch gesture. The gesture changes (UIGestureRecognizerStateChanged) when a finger moves (with both fingers remaining pressed). The gesture ends (UIGestureRecognizerStateEnded) when both fingers lift from the view.

Topics

Interpreting the Pinching Gesture

scale

The scale factor relative to the points of the two touches in screen coordinates.

velocity

The velocity of the pinch in scale factor per second.

Relationships

Inherits From

See Also

Standard Gestures

Handling UIKit Gestures

Use gesture recognizers to simplify touch handling and create a consistent user experience.

Coordinating Multiple Gesture Recognizers

Discover how to use multiple gesture recognizers on the same view.

UIHoverGestureRecognizer

A gesture recognizer that looks for pointer movement over a view.

UILongPressGestureRecognizer

A concrete subclass of UIGestureRecognizer that looks for long-press gestures.

UIPanGestureRecognizer

A concrete subclass of UIGestureRecognizer that looks for panning (dragging) gestures.

UIRotationGestureRecognizer

A concrete subclass of UIGestureRecognizer that looks for rotation gestures involving two touches.

UIScreenEdgePanGestureRecognizer

A gesture recognizer that looks for panning (dragging) gestures that start near an edge of the screen.

UISwipeGestureRecognizer

A concrete subclass of UIGestureRecognizer that looks for swiping gestures in one or more directions.

UITapGestureRecognizer

A concrete subclass of UIGestureRecognizer that looks for single or multiple taps.