insertSublayer(_:above:)
Inserts the specified sublayer above a different sublayer that already belongs to the receiver.
Declaration
func insertSublayer(_ layer: CALayer, above sibling: CALayer?)Parameters
- layer:
The sublayer to be inserted into the current layer.
- sibling:
An existing sublayer in the current layer. The layer in
aLayeris inserted after this layer in the Sublayers array, and thus appears in front of it visually.
Discussion
If sublayer is not in the receiver’s sublayers array, this method raises an exception.