The following is from documentation :
Although taps are discrete gestures, they are discrete for each state of the gesture recognizer; thus the associated action message is sent when the gesture begins and is sent for each intermediate state until (and including) the ending state of the gesture.
The above passage seems to indicate that more than one message is sent. The messages would include a "begin" message and an "end" message. But somehow I just get the "gesture end" message. Is there any way I can get both the tap begin and end message ? (What I wish to track is - "begin" : the moment the user touches the screen and "end" : the moment the user lifts his finger away from the screen.)
Hope that somebody who is knowledgable on this could help ...
Why don't you use
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
method ?The
UITapGestureRecognizer
only fires when the gesture state isUIGestureRecognizerStateEnded
If you want to use a gesture recogniser to detect the start and end of a press, use the
UILongPressGestureRecognizer
, with theminumumPressDuration
set to 0