I have a card view with a front and a back. The front and back are CALayer
s composed in a CATranformLayer
. The back layer is transformed to flip it to face the right direction, and then moved in the z direction to be slightly behind the front.
When I adjust the opacity of the parent CATransformLayer
from 1.0 to 0.0, I expect to see the front-facing side fade-out, but instead am seeing both sides blending and fading out together.
I had previously fixed this by setting both sides's doublesided
property to NO
, but this elicited a warning:
<CATransformLayer: 0x174227500> - changing property doubleSided in transform-only layer, will have no effect
…thing is, it does have an effect. Setting doublesided
to no prevents the blending of the layers on fade out. Here's what happens when doublesided
isn't set (and defaults to YES
):
Is this a bug with CATransformLayer
or is my understanding off?
Here's a gist of the problem as well.