I have a CAGradientLayer that I want to hide sometimes. The .hidden is a read-only property. The CAGRadientLayer is added as a sublayer to my view. I put in NSLog statements to see if my conditions are being hit and they are the way I want. However, sometimes the .opacity = 0.0 does hide the layer, sometimes it doesn’t. Has anyone else had consistency problems with this? Is there a better way to hide the layer? Thanks.
Share
Why do you say that the
hiddenproperty is readonly? It’s writable: