I have several full-screen CALayers as part of a single UIView. Depending on how the user interacts with the view, I need to show one layer and hide all the others. I am currently doing this by changing the opacity, i.e.
Hide layer: [layer setOpacity: 0]; Layer for display: [layer setOpacity: 1];
For some reason, I donโt quite understand, it seems to create a flashing effect on the screen. Partly to avoid this, but also because I get the impression that changes in opacity can affect performance, I wonder if changing opacity is actually the best way to hide and / or show CALayers, for example. should I change zPosition or change its position so that it no longer appears on the screen.
I donโt want to animate the transition by the way.
Thanks in advance for any pointers or help.
ios calayer
pingin
source share