I have a structure composed on a root layer and 2 CALayer subclass. These 2 layers contain a layer too.
Here a scheme:
ROOT LAYER
|
|------- LAYER A
| |---------BG
|
|
|--------LAYER B
|---------BG
If I call the hitTest
method on the ROOT LAYER
it returns the most inner layer into the hierarchy. So if user clicks over LAYER A
I get the BG
of LAYER A
.
//In this example hitResult will contains the BG of LAYER A or the BG of LAYER B
CALayer *hitResult = [rootLayer hitTest:point)];
How can I stop the responder chain and get directly LAYER A
or LAYER B
from a HitTest sent to ROOT LAYER
?