Appends the layer to the layer’s list of sublayers.
SDKs
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Core Animation
Declaration
func addSublayer(_ layer: CALayer)
Parameters
aLayer
The layer to be added.
Discussion
If the array in the sublayers property is nil
, calling this method creates an array for that property and adds the specified layer to it.