Hi,
In my latest project, I've been struggling to use UIKit for the UI. My problem is that the whole touch interaction responder chain doesn't suit what I'm trying to do, and I'm wondering if there's an easy way to change the behavior.
As an example, I have a UIScrollView with a large view inside of it. This view contains other UI elements, and even other UIScrollViews. The problem is that the containing UIScrollView takes over the touch events, preventing you from interacting with the layers below it. If I'm understanding UIKit correctly, the only way to change this behavior is to manually direct touches to all of these UI elements by overriding the hit test on each element. That seems totally backwards to me, since it means tons of custom code for what seems like standard functionality.
So, what I was wondering is if there was a better/simpler way of doing things. Ideally, I'd like the touches to travel through the draw list, giving the lowest level UI elements the first crack at the touch events, then passing them up to parent views in reverse draw order. UIKit seems to work in reverse, giving the top level objects first crack at the events and delegating down to sub-objects; then passing the events back up the parenting chain, but directly to parent, skipping any other views on the same parenting level.
Anyone deal with issues like this? How do you go about solving them? I'm almost at the point of replacing the entire UI with custom-cocos UI since cocos responds to touches the way I prefer them to work (reverse draw order).