tags:

views:

390

answers:

2

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?

+3  A: 

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
A: 

The correct answer to this question should be RTFM (read the faq meticulously) as it's a basic tenet of the UI for iPhone.

don't mark this down because I suggest reading the documentation - that should always be the first place to look, not asking a question online :(

KevinDTimm
But It's not an answer to his question.
José Joel.
baloney, it is an answer to his question :(give a man a fish, he eats for a day; teach a man to fish, he eats forever
KevinDTimm