I’m catching touch events. I need to differentiate two events
1) User touched a screen and then lifted a finger
2) User touched screen and don’t lifted a finger
How can I differentiate two events?
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
if (isFirstCase)
{}
if (isSecondCase)
{}
}
Attribute
(NSSet *)touchescontainsUITouchobjects each of them contain several helpful properties:Phase and tapCount is very usable property to identify the type of touch.
Check if you can use UIGestureRecognizers.
NSArray *gestureRecognizers– the array of this objects which related to this particular touch.Have a nice day 🙂