Instance Method

addSublayer:

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

Declaration

- (void)addSublayer:(CALayer *)layer;

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.

See Also

Managing the Layer Hierarchy

sublayers

An array containing the layer’s sublayers.

superlayer

The superlayer of the layer.

- removeFromSuperlayer

Detaches the layer from its parent layer.

- insertSublayer:atIndex:

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

- 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.