In my app i want to create a custom gesture recognizer that recognizes a long press followed by a swipe.
I need to measure if the length of the long press is more than 1 second. If it is, then call a function and wait for the swipe action to begin.
My problem is that I the only way i know now how long the press was is by extracting the timestamp of touchesBegan from touchesMoved. However i want to know that elapsed time before touchesMoved gets called.
Is there a way to know the length of the tap before the touchesMoved is called?
Thanks in advance!
you can use may code, it can use, but maybe you should deal with some details
in the .h file you should add these ivar:
in the .m file you should add these method: