onChanged(_:)
Adds an action to perform when the gesture’s value changes.
Declaration
@MainActor @preconcurrency func onChanged(_ action: @escaping (Self.Value) -> Void) -> _ChangedGesture<Self>Parameters
- action:
The action to perform when this gesture’s value changes. The
actionclosure’s parameter contains the gesture’s new value.
Mentioned in
Return Value
A gesture that triggers action when this gesture’s value changes.