CGPoint begen = [touch locationInView: [touch view];
NSSet * allTouches = [event allTouches]; // obtain all touch points
Int count = [[allTouches allObjects] count]; // the current number of touch points. The value of single-touch is 1.
If (count = 1) {// single point of touch
UITouch * toucher = [[allTouches allObjects] objectAtIndex: 0]; // obtain the first touch point
Switch ([toustmtapcount]) {// determines whether to click or double-click
Case 1:
NSLog (@ "Click \ n ");
Break;
Case 2:
NSLog (@ "double-click \ n ");
Break;
}
} Else if (count = 2) {// multi-point touch
CGPoint touch0_point = [[[allTouches allObjects] objectAtIndex: 0] locationInView: [touch view];
CGPoint touch1_point = [[[allTouches allObjects] objectAtIndex: 1] locationInView: [touch view];
TouchSpriteB _. position = touch0_point;
TouchSpriteA _. position = touchequalpoint;
NSLog (@ "Two-Point Touch \ n % f --- % f", touch0_point.x, touch1_point.x );