Instance Method

onEnded(_:)

Adds an action to perform when the gesture ends.

Declaration

func onEnded(_ action: @escaping (Value) -> Void) -> _EndedGesture<DragGesture>

Parameters

action

The action to perform when this gesture ends. The action closure’s parameter contains the final value of the gesture.

Return Value

A gesture that triggers action when the gesture ends.

See Also

Performing the Gesture

func onChanged((Value) -> Void) -> _ChangedGesture<DragGesture>

Adds an action to perform when the gesture’s value changes.

struct DragGesture.Value

The attributes of a drag gesture.