Instance Method

onChanged(_:)

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

Declaration

func onChanged(_ action: @escaping (Self.Value) -> Void) -> _ChangedGesture<Self>
Available when Value conforms to Equatable.

Parameters

action

The action to perform when this gesture’s value changes. The action closure’s parameter contains the gesture’s new value.

Return Value

A gesture that triggers action when its value changes.

See Also

Performing the Gesture

func onEnded((Self.Value) -> Void) -> _EndedGesture<Self>

Adds an action to perform when the gesture ends.

associatedtype Value

The type representing the gesture’s value.

Required.