1

I have an empty View-Based app. I'd like to do something with the x,y coordinates of every touch down on the screen. How do I do this?

Chris Hanson
  • 54,380
  • 8
  • 73
  • 102
Tommy
  • 481
  • 1
  • 6
  • 9

1 Answers1

3

Override the

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 

function (from the NSRespondrer class). You can override it from your view class. The 'touches' variable hold a set of 'UITouch' instances that you can query for the location in the view.

Martin Cote
  • 28,864
  • 15
  • 75
  • 99