Updates the provided gesture state property as the gesture’s value changes.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- watchOS 6.0+
- Xcode 11.0+
A binding to a view’s
The callback that SwiftUI invokes as the gesture’s value changes. Its
currentparameter is the updated state of the gesture. The
gestureparameter is the previous state of the gesture, and the
transactionis the context of the gesture.
A version of the gesture that updates the provided
state as the originating gesture’s value changes, and that resets the
state to its initial value when the users cancels or ends the gesture.
Use this callback to update transient UI state as described in Adding Interactivity with Gestures.