Instance Method


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


- (void)layout;


Override this method if your custom view needs to perform custom layout not expressible using the constraint-based layout system. In this case you are responsible for setting needsLayout to YES when something that impacts your custom layout changes.

You may not invalidate any constraints as part of your layout phase, nor invalidate the layout of your superview or views outside of your view hierarchy. You also may not invoke a drawing pass as part of layout.

You must call [super layout] as part of your implementation.

See Also

Triggering Auto Layout


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

- layoutSubtreeIfNeeded

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


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.