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
2009-02-12 20:02:01
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
2009-02-12 20:18:13
But It's not an answer to his question.
José Joel.
2009-09-02 17:41:29
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
2009-09-03 09:20:47