Search code examples
iosuigesturerecognizergesture

Recognize custom user finger drawn gestures


How do you create/handle custom user finger drawn gesture recognizers?

I would need to handle the event when user draws for example a 'Z' letter, or possible some another sign.

Is there any available library for defining and handling such kind of gestures?


Solution

  • Take a look at the $1 recognizer.

    Essentially it modifies the input points into a more uniform state space and then compares this with recorded gestures that have also been pre-processed.

    It's quite simple to implement and very effective. There are other techniques which are more 'state of the art' but are much more complicated and heavy on the maths (FFTs etc).

    There is JavaScript and c# code available for it but it is not difficult to translate to Objective-C or C++.