Questions tagged [gesture-state]

3 questions
7
votes
0 answers

SwiftUI: How to add gesture state without property wrapper?

How can I add gesture state without property wrapper/intermediate between @GestureState and squanced gestures updating modifier. In the case of bindings we can do : @Binding value: Bool = false then let binding = Binding(get: { self.value…
Michał Ziobro
  • 10,759
  • 11
  • 88
  • 143
2
votes
1 answer

Explicit animation of @GestureState in SwiftUI

I am learning SwiftUI as a hobby and I am trying to create a draggable rectangular view using @GestureState as shown here. When the view is being dragged I want to animate a change in corner and shadow radius. The example in Apple Documentation uses…
0
votes
0 answers

Animation issue when Long-Press is canceled - SwiftUI, iOS 14.5

I'm still learning and trying to understand the ins and outs of swiftUI. Currently, I focus on understanding gestures and animations and here is an issue that seems unsolvable at my experience level: The problem: I experience unexpected behavior if…
nevrx
  • 37
  • 6