- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = touches.anyObject;
_dragStartPos = [touch locationInView:self];
/////////Logic To Handle Single and Double Tap
//the the first tap delegate message if its a double tap and so on
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(singleTap)
object:nil];
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(doubleTap)
object:nil];
//logic to get the tap count
if(touches.count == 1)
{
if([[touches anyObject] tapCount] == 2)
{
[self performSelector:@selector(doubleTap)
withObject:nil
afterDelay:0.35];
}
else if([[touches anyObject] tapCount] == 3)
{
[self trippleTap];
}
else
{
[self performSelector:@selector(singleTap)
withObject:nil
afterDelay:0.35];
}
}
}