Reputation: 481
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?
Upvotes: 1
Views: 963
Reputation: 29882
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.
Upvotes: 3