Without subclassing a UIResponder class(e.g. UIView) and overriding its touchesBegan:withEvent: method, is it possible to get informed of touch events of a UIResponder class?
This question was answered here.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question is somewhat confusing…’without subclassing UIResponder…can you get informed of touch events of UIResponder?’ Are you asking if you can add touchesBegan/Moved/Ended/Cancelled events to any NSObject?!? I’m not comfortable enough with the framework yet to know for sure if those methods would be called if they were implemented as a category on or subclass of NSObject?!?
But, regardless of what you’re doing, the top (end) of the responder chain is UIApplication (also a subclass of UIResponder) and if you have an iPhone app then you have a singleton of UIApplication which you can query for touch events…