canPrevent
TypeScriptcanPrevent(preventedGestureRecognizer: _UIKit_UIGestureRecognizer): Promise<boolean>Swift declaration@MainActor @preconcurrency override dynamic func canPrevent(_ preventedGestureRecognizer: UIGestureRecognizer) -> Boolclass · iOS 13.0+ · SDK 27.1
@MainActor @objc @preconcurrency class EntityTranslationGestureRecognizerA gesture recognizer that uses a pan gesture to move an entity. A gesture recognizer that handles pan and dragging gestures on an entity.
canPrevent(preventedGestureRecognizer: _UIKit_UIGestureRecognizer): Promise<boolean>Swift declaration@MainActor @preconcurrency override dynamic func canPrevent(_ preventedGestureRecognizer: UIGestureRecognizer) -> Boolreset(): Promise<void>Swift declaration@MainActor @preconcurrency override dynamic func reset()Overridden to reset internal state when a gesture recognition attempt completes.
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.
touchesCancelled(touches: Array<_UIKit_UITouch>, event: _UIKit_UIEvent): Promise<void>Swift declaration@MainActor @preconcurrency override dynamic func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent)Sent to the gesture recognizer when a system event (such as an incoming phone call) cancels a touch event. - Parameters: - touches: A set of `UITouch` instances in the event represented by `event` that represent the touches in the `UITouch.Phase.cancelled` phase. - event: A `UIEvent` object representing the event to which the touches belong.
touchesEnded(touches: Array<_UIKit_UITouch>, event: _UIKit_UIEvent): Promise<void>Swift declaration@MainActor @preconcurrency override dynamic func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent)Sent to the gesture recognizer when one or more fingers lift from the associated view. - Parameters: - touches: A set of `UITouch` instances in the event represented by `event` that represent the touches in the `UITouch.Phase.ended` phase. - event: A `UIEvent` object representing the event to which the touches belong.
touchesMoved(touches: Array<_UIKit_UITouch>, event: _UIKit_UIEvent): Promise<void>Swift declaration@MainActor @preconcurrency override dynamic func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent)Sent to the gesture recognizer when one or more fingers move in the associated view. - Parameters: - touches: A set of `UITouch` instances in the event represented by `event` that represent the touches in the `UITouch.Phase.moved` phase. - event: A `UIEvent` object representing the event to which the touches belong.
setTranslation(translation: SDKHandle, entity?: (_RealityFoundation_Entity) | null): Promise<void>Swift declaration@MainActor @preconcurrency func setTranslation(_ translation: SIMD3<Float>, in entity: Entity?)Sets the translation of the receiver in the entity's coordinate space - Parameters: - translation: A point that identifies the new translation value. - entity: An entity in whose space the translation is to occur. A `nil` entity will result in world space.
translation(entity?: (_RealityFoundation_Entity) | null): Promise<(SDKHandle) | null>Swift declaration@MainActor @preconcurrency func translation(in entity: Entity?) -> SIMD3<Float>?The translation of the gesture in the space of the specified entity. - Parameters: - entity: An entity in whose space the translation is computed. A `nil` entity will result in world space. - Returns: The 3D position identifying the translation of the gesture in the space specified. The x, y and z values report the total translation over time. They are not delta values from the last time that the translation was reported. Apply the translation value to the state of the entity when the gesture is first recognized -- do not concatenate the value each time the handler is called.
get entity(): Promise<(SDKHandle) | null>Swift declaration@MainActor @preconcurrency var entity: (any HasCollision)? { get set }The entity the receiver is associated with
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
location(entity?: (_RealityFoundation_Entity) | null): Promise<(SDKHandle) | null>Swift declaration@MainActor @preconcurrency func location(in entity: Entity?) -> SIMD3<Float>?Returns the unprojected location of the gesture represented by the receiver in the space of the given entity. - Parameters: - entity: An entity in whose space the location is computed. A `nil` entity will result in world space. - Returns: The 3D position identifying the location of the gesture in the space specified. The location is typically the result of a centroid of touches for a gesture, unprojected onto the associated `entity`, and then converted into the space of the entity passed in, or world space if `nil` is passed in.
velocity(entity?: (_RealityFoundation_Entity) | null): Promise<SDKHandle>Swift declaration@MainActor @preconcurrency func velocity(in entity: Entity?) -> SIMD3<Float>The velocity of the translation gesture in the space of the specified entity. - Parameters: - entity: The entity in whose space the velocity of the translation gesture is computed. A `nil` entity will result in world space. - Returns: The velocity of the translation gesture, in the space of the specified entity, in meters per second.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
EntityTranslationGestureRecognizer.init(target:action:)
Objective-C selectors cannot cross the bridge.