In SwiftUI, I’d like to be able to increment a state variable based on a user’s input. I envision the user swiping a wheel that rotates about a vertical axis. For example, a rotation3D effect on a “tic-like” view that rotates/animates based on swiping action. I’m imagining rotation is about the vertical axis but that doesn’t really matter, it could be about any axis and the problem remains. The swiping action should generate momentum that slows overtime exactly like ScrollView. The problem with scrollView is that it has a finite range and is linear. I’m looking for an endless rotation that just increments by 1 each time a tic moves.
I’ve tried to use the dragGesture.Value.PredictedEndLocation combined with a custom Animatable ViewModifier. I can share the code but it’s spaghetti-like and not concise so I first wanted to ask if anyone can share a more obvious path, API, or experience?