An array containing the layer’s sublayers.
SDKs
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Core Animation
Declaration
var sublayers: [CALayer]? { get set }
Discussion
The sublayers are listed in back to front order. The default value of this property is nil
.
Special Considerations
When setting the sublayers
property to an array populated with layer objects, each layer in the array must not already have a superlayer—that is, its superlayer
property must currently be nil
.