I want to add gestures to my iPhone. I want a functionality like a user can add a gesture like draw an alphabet say for example ‘f’ and bind an application like facebook to it. Then, the next time user draws f facebook is opened automatically.
Share
You’re looking for custom gesture recognizers base on a predefined path.
That’s what Chris Miles did with
CMUnistrokeGestureRecognizer.UIBezierPathCMUnistrokeGestureRecognizerIt’s described on Chris’ blog and available on Github.
To detect multistroke gestures, you could chain multiple unistroke gesture recognizers, requiring all of them to succeed in a given order and with a maximum amount of time between each stroke.
Opening the Facebook app when the complete gesture is detected is as simple as calling