How can a superlayer
have no sublayers
? Please see image above.
This is Xcode 6.3.
As discussed in the comments, one case where a layer could be a superlayer but not have sublayers is when it has a mask.
let layer = CALayer()
let mask = CALayer()
layer.mask = mask
Now mask.superlayer
is layer
, but layer.sublayers
is nil.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With