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 this gesture’s value changes.