Instance Method


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


- (void)resizeSublayersWithOldSize:(CGSize)size;



The previous size of the current layer.


When the autoresizingMask property is used for resizing and the bounds of this layer change, the layer calls this method. The default implementation calls the resizeWithOldSuperlayerSize: method of each sublayer to let it know its superlayer’s bounds changed. You should not need to call or override this method directly.

See Also

Managing Layer Resizing and Layout


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

- setNeedsLayout

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

- layoutSublayers

Tells the layer to update its layout.

- layoutIfNeeded

Recalculate the receiver’s layout, if required.

- needsLayout

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


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.

- preferredFrameSize

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