Is there a way to get the current UIEvent being handled?
Question
I'm working in a class that is a delegate of another class; this other class is in a third-party library that I'd like to avoid changing if at all possible.
The original class is handling a -touchesEnded event, and is delegating responsibility to me, but it doesn't pass the UIEvent itself to me. Is there a way to get a handle to the current event in progress? It's a double-tap handler, and all that is passed to me is the view being touched, and the point at which the touch occurred. I want to know exactly how many touches are involved in the event.
Thanks! randy
Solution
You can subclass the original 3rd-party view and override -touchesEnded:withEvent:
in that subclass.
You can also subclass UIApplication and override its -sendEvent:
method to capture all (public) events.