Instance Method

onLongPressGesture(minimumDuration:maximumDistance:pressing:perform:)

Adds an action to perform when this view recognizes a long press gesture.

Declaration

func onLongPressGesture(minimumDuration: Double = 0.5, maximumDistance: CGFloat = 10, pressing: ((Bool) -> Void)? = nil, perform action: @escaping () -> Void) -> some View

See Also

Handling View Taps and Gestures

func onTapGesture(count: Int, perform: () -> Void) -> View

Adds an action to perform when this view recognizes a tap gesture.

func gesture<T>(T, including: GestureMask) -> View

Attaches a gesture to the view with a lower precedence than gestures defined by the view.

func highPriorityGesture<T>(T, including: GestureMask) -> View

Attaches a gesture to the view with a higher precedence than gestures defined by the view.

func simultaneousGesture<T>(T, including: GestureMask) -> View

Attaches a gesture to the view to process simultaneously with gestures defined by the view.

func digitalCrownRotation<V>(Binding<V>) -> View

Tracks Digital Crown rotations by updating the specified binding.

func transaction((inout Transaction) -> Void) -> View

Applies the given transaction mutation function to all transactions used within the view.