- 1- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- 2
- 3 {
- 4NSSet *allTouch = [event allTouches];
- 5UITouch *touch = [allTouch anyObject];
- 6CGPoint point = [touch locationInView:[touch view]];
- 7 intx = point.x;
- 8 inty = point.y;
- 9NSLog(@"x,y == (%d, %d)", x, y);
- 10}
来源: