A gesture recognizer that uses rotation gestures involving two touches to rotate a given entity.


@objc class EntityRotationGestureRecognizer : UIRotationGestureRecognizer


Creating a Rotation Gesture Recognizer

init(target: Any?, action: Selector?)

Creates a rotation gesture recognizer with a target instance and an action selector.

Specifying the Entity

var entity: HasCollision?

The entity on which the recognizer operates.

Recognizing Touches

func touchesBegan(Set<UITouch>, with: UIEvent)

Tells the recognizer that the user has touched the entity with one or more fingers.

See Also

Adding Gesture Recognizers to Entities

func installGestures(ARView.EntityGestures, for: HasCollision) -> [EntityGestureRecognizer]

Installs standard gestures onto the given entity, configured to be recognized simultaneously.

struct ARView.EntityGestures

The set of possible entity gesture recognizers.

func gestureRecognizer(UIGestureRecognizer, shouldRecognizeSimultaneouslyWith: UIGestureRecognizer) -> Bool

Determines whether two gesture recognizers should simultaneously recognize a gesture.

class EntityScaleGestureRecognizer

A gesture recognizer that uses a pinch gesture to scale or zoom an entity.

class EntityTranslationGestureRecognizer

A gesture recognizer that uses a pan gesture to move an entity.

protocol EntityGestureRecognizer

An type of gesture recognizer that works on entities.


Beta Software

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