Hi,
I have a view that accepts one-finger touches for panning and two-finger touches for zooming. Now I want to add a three-finger gesture, but touchesBegan is seemingly not called when I tap with three fingers on the device. The code I have is below:
Code:
//Touches began
touches = [touches setByAddingObjectsFromSet:[event allTouches]];
//Not called with three fingers
//One- and two-finger taps work
if ([touches count] == 3)
{
NSLog(@"Began");
stages = 1;
tapCount = 3;
}
//Touches moved
//One and two fingers
touches = [touches setByAddingObjectsFromSet:[event allTouches]];
else if (tapCount == 3)
{
if ([[touches anyObject] locationInView:self].x > [[initialTouches anyObject] locationInView:self].x)
{
NSLog(@"moved");
stages = 2;
}
}
//Touches ended
touches = [touches setByAddingObjectsFromSet:[event allTouches]];
//One and two fingers
else if (tapCount == 3)
{
NSLog(@"Ended");
if (stages == 2)
if (self.delegate != nil)
[self.delegate openAssistant:self];
}
tapCount = 0;
Has anyone encountered this problem before? If so, how can I fix it?
Thanks!