One Logo Pool Ball
RealityKit · IOS API REFERENCE

EntityScaleGestureRecognizer

class · iOS 13.0+ · SDK 27.1

@MainActor @objc @preconcurrency class EntityScaleGestureRecognizer

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

Members (4)

method · iOS 13.0+

canPrevent

TypeScript
canPrevent(preventedGestureRecognizer: _UIKit_UIGestureRecognizer): Promise<boolean>
Swift declaration
@MainActor @preconcurrency override dynamic func canPrevent(_ preventedGestureRecognizer: UIGestureRecognizer) -> Bool
method · iOS 13.0+

touchesBegan

TypeScript
touchesBegan(touches: Array<_UIKit_UITouch>, event: _UIKit_UIEvent): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent)

Sent to the gesture recognizer when one or more fingers touch down on the associated entity. - Parameters: - touches: A set of `UITouch` instances in the event represented by `event` that represent the touches in the `UITouch.Phase.began` phase. - event: A `UIEvent` object representing the event to which the touches belong.

get · iOS 13.0+

entity

TypeScript
get entity(): Promise<(SDKHandle) | null>
Swift declaration
@MainActor @preconcurrency var entity: (any HasCollision)? { get set }

The entity the receiver is associated with

set · iOS 13.0+

entity

TypeScript
setEntity(value?: (Implements<_RealityFoundation_HasCollision> | SDKHandle) | null): Promise<void>
Swift declaration
@MainActor @preconcurrency var entity: (any HasCollision)? { get set }

The entity the receiver is associated with

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

EntityScaleGestureRecognizer.init(target:action:)

Objective-C selectors cannot cross the bridge.

All RealityKit types →