Can't set UILabel preferredMaxLayoutWidth in Interface Builder

Originator:jtbandes
Number:rdar://12979760 Date Originated:1/9/2013
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 4.5.2 (4G2008a)
Classification:UI/Usability Reproducible:Always
 
Attached sample project: http://d.pr/f/u5Ha

Summary:

UILabel's property preferredMaxLayoutWidth has an important effect for applications using constraint-based layout. But it can't be set in Xcode/Interface Builder (it seems to be, by default, the label's given width in IB). This leads to weird bugs.

Steps to Reproduce:
- Download attached sample project.
- Run in the iOS Simulator with hardware "iPhone"
- Run in the simulator with hardware "iPhone (Retina 3.5-inch)"

Expected Results:
- The same layout is used in both situations. The label should never wrap because there are no constraints that should affect its width.

Actual Results:
- On the Retina display the label wraps to two lines. On the non-retina display, it stays on one line.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!