IOS Sweep Gesture Recogniser for fast play
I'm new to the world of iOS development, so I start with a game that doesn't have Clash of Clans or the infamous "I'm rich". I know Python and HTML / CSS, so I can get my head around computer terms, but it would be great if you could explain any answers.
At the half-point of the flash on the screen, it flashes, let's say it is a left arrow, a right arrow, a left arrow (in the form of an image). The user then has to replicate the template (in the correct order) to grow forward. Basically, I'm asking what would be the easiest / most efficient way to program this? It would be great if I could add more templates easily.
One way to think you can do this is to have an ID for each template that has predefined "nodes" that you need to loop through in a specific order. One of the advantages of this idea is that I can add templates, however it can take a while to program them. Another idea I got is to assign an "eraser" to the user's brush and it will detect when + 95% of the pattern has changed. However, this will allow the user to scroll in any order.
Perhaps there is something ultralight that I can do, but at the moment I have no idea. It would be great if I could do this in Apple Swift, however Objective-C is not a problem.
Thank you in advance,
Will
source to share
Basically you answered your own question in the title. Take a look at the UISwipeGestureRecognizer
documentation . From there, you just want to push gestures into an array and then compare to existing template arrays
source to share