In my UIView subclass I have this:
- (void) touchesBegan: (NSSet*) touches withEvent: (UIEvent*) event
{
UITouch* touch = [touches anyObject];
CGPoint location = [touch locationInView: self];
NSLog(@"touches count: %i",[touches count]); //always shows 1
}
No matter how many fingers I touch the screen with, I only get “1” as the output. I also added the above to touchesMoved with same results.
Have you enabled the multitouch option?
This is by default false, that will translate all touches on your view to one single touch in the middle of all other touches.
Setting it to
YESwill make your view recieve one touch event for each finger (or pen) on screen