Instance Property

needsLayout

A Boolean value indicating whether the view needs a layout pass before it can be drawn.

Declaration

@property BOOL needsLayout;

Return Value

YES if the view needs a layout pass, NO otherwise.

Discussion

You only ever need to change the value of this property if your view implements the layout method because it has custom layout that is not expressible in the constraint-based layout system. Setting this property to YES lets the system know that the view’s layout needs to be updated before it is drawn. The system checks the value of this property prior to applying constraint-based layout rules for the view.

See Also

Triggering Auto Layout

- layout

Perform layout in concert with the constraint-based layout system.

- layoutSubtreeIfNeeded

Updates the layout of the receiving view and its subviews based on the current views and constraints.

needsUpdateConstraints

A Boolean value indicating whether the view’s constraints need to be updated.

- updateConstraints

Update constraints for the view.

- updateConstraintsForSubtreeIfNeeded

Updates the constraints for the receiving view and its subviews.