small medium large xlarge

21 Apr 2009, 19:43
Bruce Platti (1 post)

I have read the Core Animation book and trying to implement on iPhone but have a small issue.

I have three layers. Three rectangles.(vertical orientation) Two of them are side by side and one is overlaying both of the other two. The third only covers about half of each of the others. The third is above the others in Z.

Using hitTest I can select the third layer only above the second layer and not by picking above the first layer. (picking the third layer in areas that intersects other layers). When I pick in an area that intersects the first layer the first layer is selected.

I need to be able to pick on the third layer within the third layers bounds or frame without selecting the layers below.

Can anyone help?


22 Apr 2009, 13:19
Bill Dudney (916 posts)

There could be something with hitTest: preferring the order in the sublayers array rather than the z-order. Have you tried switching that around?

Good luck!

You must be logged in to comment