Gesture

An instance that matches a sequence of events to a gesture, and returns a stream of values for each of its states.

ProtocoliOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+Gesture in SwiftUI

Declaration

React
type Gesture = GestureChain;
Swift
@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

See also

More in Gestures and input.