在我的UIView
子类中,我有这个:
- (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
}
无论我用多少根手指触摸屏幕,我都只会得到“1”作为输出。我还将上述内容添加到touchesMoved
相同的结果中。