CALayer rotation on Y axis ignores z position
Posted
by Rafa
on Stack Overflow
See other posts from Stack Overflow
or by Rafa
Published on 2010-05-25T08:18:56Z
Indexed on
2010/05/25
8:21 UTC
Read the original article
Hit count: 319
Hi,
i have some CALayers one on top of the other with different z-values. the z-values are sequential (1,2,3 ...). i wrote some code that changes the y-rotation of a CALayer when i click on it. the y-rotations changes to -30.f
the problem is that when i click on a CALayer it rotates and goes behind the CALayers that are actually beneath it (by z-value ordering).
i understand that changing the y-rotation by -30.f actually takes the CALayer back in a sense. but shouldn't it consider the z-value as the index of the CALayer in the container and make sure it stays on top of lower z-values ?
© Stack Overflow or respective owner