I'm making an app in SwiftUI that requires the user to tap a button repeatedly very fast.
When the user taps the button quickly with multiple fingers, every second or so the button will fail to recognize the tap gesture, and the console will output:
<...> Gesture: Failed to receive system gesture state notification before next touch
In my view, I used a Button
, to no luck:
Button(action: handleTap) {
Text("Press me!")
}
Then, I tried onTapGesture(perform:)
, again to no avail:
Text("Press me!")
.onTapGesture(perform: handleTap)
But now, I'm stumped. Am I missing something here? Is SwiftUI not designed to handle rapid inputs in this fashion? I'm relatively new with SwiftUI, so any feedback is greatly appreciated.