views:

14

answers:

1

I'm doing some layer drawing on the iPad and have to provide user interaction. My layer hierarchy is quite complex and deep, I'm drawing some kind of a tree with several interaction possibilities.

At the moment I need to draw arrows within this tree which should be drawn on top of all other layers and there the problem comes. These Arrows can cross the whole tree and their bounds overlay my other layers. When I try to hit test on my root layer these overlaying layers are the result (as they should be).

My question is, how can i prevent these overlaying layer from responding to the hit test? Can I just turn it off like the userInteraction flag for views or do I need to reconstruct my layer hierarchy. Maybe it works to use an overlay layer parallel to the root layer and hit test on the hierarchy without these overlays?

thnx in advance, /martin

+1  A: 

While writing my question the answer rushed into my mind. As assumed, bringing these overlay drawings parallel to the complex tree and hit test on the root layer of the tree works perfectly!

mgratzer
+1 for only having 16 rep
willcodejavaforfood