Instance Method

insertSublayer:atIndex:

Inserts the specified layer into the receiver’s list of sublayers at the specified index.

Declaration

- (void)insertSublayer:(CALayer *)layer atIndex:(unsigned int)idx;

Parameters

aLayer

The sublayer to be inserted into the current layer.

index

The index at which to insert aLayer. This value must be a valid 0-based index into the sublayers array.

See Also

Managing the Layer Hierarchy

sublayers

An array containing the layer’s sublayers.

superlayer

The superlayer of the layer.

- addSublayer:

Appends the layer to the layer’s list of sublayers.

- removeFromSuperlayer

Detaches the layer from its parent layer.

- insertSublayer:below:

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

- insertSublayer:above:

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

- replaceSublayer:with:

Replaces the specified sublayer with a different layer object.