Interface Builder does not display multiline label in stack view correctly

Number:rdar://35472916 Date Originated:11/10/2017
Status:Open Resolved:
Product:Xcode Product Version:9.2 beta
Classification: Reproducible:Yes
I have attached a small sample project. When a multiline UILabel is placed in a UIStackView, Interface Builder does not render it correctly.  It will either not display at all or produce an "Interface Builder does not support UILabel sizes larger than 10,000 by 10,000" error.  It does display correctly when ran, with no ambiguous or conflicts with constraints. 

The stack view's width is defined by its constraints to the safe area, so the multiline label should be able to determine its size.

Steps to Reproduce:
1. Open the attached UIStackViewBug Xcode project.  
2. Run the project and notice that the label displays correctly.
3. Open Main.storyboard and observe that Interface Builder does not display it correctly.
4. Open the Preview assistant editor and observe that it does not display it correctly.

Expected Results:
Interface Builder should display the screen correctly.
The Preview assistant editor should display the screen correctly.

Actual Results:
Neither Interface Builder nor Preview Assistant Editor displays the label correctly.
Sometimes when you open the project in Xcode, it will show a window that states: The document "Main.storyboard" had 2 internal inconsistencies that were found and repaired.  However it will quickly go back to not displaying correctly in IB if you edit anything.

Xcode version 9.2 beta (9C34b)

2015 Macbook Pro 15"


Any progress?

I found some bug, any progress?

By omar.zhou at Feb. 6, 2018, 9:43 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!