Class

UIPinchGestureRecognizer

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

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

Topics

Interpreting the Pinching Gesture

var scale: CGFloat

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

var velocity: CGFloat

The velocity of the pinch in scale factor per second.

Relationships

Inherits From

Conforms To

See Also

UIKit 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.

class UILongPressGestureRecognizer

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

class UIPanGestureRecognizer

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

class UIScreenEdgePanGestureRecognizer

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

class UISwipeGestureRecognizer

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

class UIRotationGestureRecognizer

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

class UITapGestureRecognizer

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