Reputation: 6394
I have a hierarchy of views with different UIGestureRecognizers
. Every now and then one of them stops working, and I am looking for an efficient way to debug this. Due to the passive nature of UIGestureRecognizers
in general, I always find them hard to debug. If one stops working, the two things that I can think of would be to
touchesBegan:withEvent:
on all relevant views to try to track down the passing of a touchThese sometimes don't cut it, though, as is the current situation where I have a UITapGestureRecognizer
that sometimes (I believe after presenting and dismissing views) stops working while the app is running.
Upvotes: 4
Views: 761
Reputation: 4451
I would recommend checking out the little known (IME) property gestureRecognizers on UITouch, that may be enough to help you. You can also combine this with overriding the UIWindow and UIApplication methods called sendEvent to gain more visibility into the sequence of events wrt. touch handling. (No pun intended.)
Upvotes: 5