i want to detect when user uses one finger to make a circular motion on a UIView
any help will be appreciated
i want to detect when user uses one finger to make a circular motion on a UIView
any help will be appreciated
Subclass youe UIView and implement
– touchesBegan:withEvent:
– touchesMoved:withEvent:
– touchesEnded:withEvent:
– touchesCancelled:withEvent:
In touch moved you get the new touch points and you can see if the touch points are on a circle arc.
I know it's bad practice to answer with a bunch of links. But so is reinventing the wheel.
Take a look at:
Recognising a circle gesture to drop an annotation, how to detect circle?
How to detect a circle motion with UIGestureRecognizer
How to detect circular gesture via Gesture Recognizer?
All the linked questions include accepted answers.