🔰update gesture states

SwiftUIGestures ⟩ update gesture states

  • To update a view as a gesture changes, add a GestureState property to your view and update it with updating(_:body:).

  • SwiftUI invokes the updating callback as soon as it recognizes the gesture and whenever the value of the gesture changes.

  • SwiftUI doesn’t invoke the updating callback when the user ends or cancels a gesture. Instead, the gesture state property automatically resets its state back to its initial value.

Last updated

Was this helpful?