Instance Method

insertSublayer(_:below:)

Inserts the specified sublayer below a different sublayer that already belongs to the receiver.

Declaration

func insertSublayer(_ layer: CALayer, below sibling: CALayer?)

Parameters

aLayer

The sublayer to be inserted into the current layer.

sublayer

An existing sublayer in the current layer. The layer in aLayer is inserted before this layer in the sublayers array, and thus appears behind it visually.

Discussion

If sublayer is not in the receiver’s sublayers array, this method raises an exception.