I’ve created a UIView subclass in which I intercept all touches, check for certain conditions, and, if they aren’t met, forward the touches to the appropriate subview. The problem is, if the subview doesn’t intercept the touch, it’s forwarded right back up the responder chain to my view, here I forward it back to the subview, and so on. How can I stop this from happening?
I’ve created a UIView subclass in which I intercept all touches, check for certain
Share
The responder chain is designed to pass events to superviews. I would make the subviews selectively handle events (check the opposite conditions) so events can be forwarded to the superview when it has to handle the event.
However, if only the superview can check the condition, the subviews will have to handle all events the superview sends (at least not to call UIView’s event handling routine which forwards events to superviews).