Im talking about two separate touches on the screen with the same finger
I think i have the coding right for this. but it is almost impossible for me to actually generate a double tap on my iPad. Is it possible to increase the time interval between a single and double tap, so it is easier to trigger. I do a double tap very fast and it captures it as two single clicks. only sometimes am i lucky enough to trigger a double tap. I place my subclass of UIButton item into a scrollview.
Anyway my subclass of UIButton implements:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [[event allTouches] anyObject];
NSLog(@"Touch count:%d",touch.tapCount);
if (touch.tapCount == 1)
{
//Do things for one touch
}
else if (touch.tapCount == 2)
{
//Do things for double touch
}
}
This is capturing the event. and that is why i think my code is right, i just couldnt find anything that has to do with UIEvent and what determines how many touches happen. I tested this same thing in a different UIView and it worked exactly as expected.