Contents

RotateGesture3D

A gesture that recognizes 3D rotation motion and tracks the angle and axis of the rotation.

Declaration

struct RotateGesture3D

Overview

You can constrain this gesture to recognize rotation about a specific 3D axis. For example, RotateGesture3D(constrainedToAxis: .x) creates a gesture that recognizes rotation only around the global X axis. The axis you provide will be normalized.

A rotation gesture tracks how a rotation event sequence changes. To recognize a rotation gesture on a view, create and configure the gesture, and then add it to the view using the gesture(_:including:) modifier.

Topics

Creating the gesture

See Also

Recognizing gestures that change over time