次のコードがあります。
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
NSUInteger touchCount = 0;
// Enumerates through all touch objects
for (UITouch *touchb in touches){
touchCount++;
}
// When multiple touches, report the number of touches.
if (touchCount > 1) {
lblStatustouch.text = [NSString stringWithFormat:@"Tracking %d touches", touchCount];
} else {
lblStatustouch.text = [NSString stringWithFormat:@"Tracking 1 touch", touchCount];
}
実行すると、複数のタッチが検出されることはありません。アプリが複数回タッチできないようにする設定はありますか? それとも、ここで何か不足していますか?