Preventing ambiguous layout

suggest change

A frequent question about stack views inside scroll views is the ambiguous width and height alerts in Interface Builder. This answer walks through the constraints. Pin a content view’s top, bottom, leading, and trailing edges to the scroll view, then add an equal-width constraint for vertical scrolling or an equal-height constraint for horizontal scrolling. Centering the content view on both axes does not give it a size.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents