At the moment I am programming a game in swift, Xcode and I would like the user to be able to choose what controls they want (either slide or tap). As of now I have been able to make my SKNode slide in the main game scene, as well as respond to tapping. However I have found that the SKNode shakes constantly when you slide (as the touchesBegan function thinks I'm tapping on the screen).
If anyone knows the best way to suspend one of the functions while the other stays active please let me know :)
For example: The user chooses to play the game by sliding, I would like to suspend the touchesBegan function but keep the touchesMoved active.
There is a delegate method to check if one gesture fails, if is true the other gesture is recognized. For example, in my project I have two gestures, tap once and tap twice and I used:
For more information check Apple's reference: https://developer.apple.com/documentation/uikit/uigesturerecognizer/1620006-shouldrequirefailure