Gesture
An instance that matches a sequence of events to a gesture, and returns a stream of values for each of its states.
Declaration
type Gesture = GestureChain;@MainActor @preconcurrency protocol Gesture<Value>Overview
Create custom gestures by declaring types that conform to the Gesture
protocol.
From Apple’s SwiftUI documentation. Code samples there are Swift.
Used by
- gestureAttaches a gesture to the view with a lower precedence than gestures defined by the view.
- highPriorityGestureAttaches a gesture to the view with a higher precedence than gestures defined by the view.
- simultaneousGestureAttaches a gesture to the view to process simultaneously with gestures defined by the view.
See also
More in Gestures and input.
- AutomaticHoverEffectThe default hover effect based on the surrounding context.
- CustomHoverEffectA type that represents how a view should change when a pointer hovers over a view, or when someone looks at the view.
- DragConfigurationThe behavior of the drag, proposed by the dragging source. A value that describes the drag operations a drag source supports.
- DragConfigurationOperationsOutsideAppDescribes the suggested drag operations to other applications.
- DragConfigurationOperationsWithinAppDescribes the drag operations suggested to destinations within the app.
- DragGestureA dragging motion that invokes an action as the drag-event sequence changes.
- DragGestureValueThe attributes of a drag gesture.
- DragSessionDescribes the ongoing dragging session.
- DragSessionIDThe identifier of a drag session.
- DragSessionPhaseThe phase of the current drag session
- GestureChainGesture with chained calls: SwiftUI.Gesture.exclusively(...).
- GestureInputKindsAn option set that specifies which input kinds a gesture should recognize.