Instance Property


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


@property CAAutoresizingMask autoresizingMask;


If your app does not use a layout manager or constraints to handle layout changes, you can assign a value to this property to adjust the layer’s size in response to changes in the superlayer’s bounds. For a list of possible values, see CAAutoresizingMask.

The default value of this property is kCALayerNotSizable.

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.

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