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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.