Reputation: 21805
I am thinking of making a password sequence for my app, like that in dot protection. Do I have to learn the whole open Gl es for it, or it can be done with (void) touchesMoved
and then checking each button is in a CGrectIntersects()
?
I am thinking of giving the CGrectInterscts
a try, but after I saw that the dot protection app technique somehow doesn't let user move to 2 from 1 (see screenshot).
I think this type of complex mechanism is something that cannot be done with that way.
Upvotes: 0
Views: 485
Reputation: 11595
If you don't want to roll your own implementation, you could use some libraries that already exist like ALUnlockPatternView which looks like this:
Or Android Pattern Lock which looks like this:
Upvotes: 1
Reputation: 2722
I think it's definitely something that you can achieve with touchesmoved! I've done something like this myself and I think you should do it exactly as you said, simply track each move with the touchesbegan (and touchesmoved and touchesended) and use the CGRectIntersect with your uiimageviews or coordinates, however you want to do it. It's possible!
Upvotes: 0