Instance Method

layoutSublayers

Tells the layer to update its layout.

Declaration

- (void)layoutSublayers;

Discussion

Subclasses can override this method and use it to implement their own layout algorithm. Your implementation must set the frame of each sublayer managed by the receiver.

The default implementation of this method calls the layoutSublayersOfLayer: method of the layer’s delegate object. If there is no delegate object, or the delegate does not implement that method, this method calls the layoutSublayersOfLayer: method of the object in the layoutManager property.

See Also

Managing Layer Resizing and Layout

layoutManager

The object responsible for laying out the layer’s sublayers.

- setNeedsLayout

Invalidates the layer’s layout and marks it as needing an update.

- layoutIfNeeded

Recalculate the receiver’s layout, if required.

- needsLayout

Returns a Boolean indicating whether the layer has been marked as needing a layout update.

autoresizingMask

A bitmask defining how the layer is resized when the bounds of its superlayer changes.

- resizeWithOldSuperlayerSize:

Informs the receiver that the size of its superlayer changed.

- resizeSublayersWithOldSize:

Informs the receiver’s sublayers that the receiver’s size has changed.

- preferredFrameSize

Returns the preferred size of the layer in the coordinate space of its superlayer.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software