Auto-Layout for secondary display on retina iPad positions controls incorrectly.

Originator:chucksh
Number:rdar://13869681 Date Originated:11-May-2013 05:18 PM
Status:Resolved Resolved:iOS7 beta 4
Product:iPad SDK Product Version:6.1
Classification: Reproducible:Always
 
Summary:

If you write an iPad app that shows UI on a secondary display, the views will not be laid out correctly if the XIB for the secondary display views uses Auto-Layout, and the app is running on a retina iPad.

Steps to Reproduce:

1. Build the attached sample code, and run the app in the iOS Simulator with the 1x iPad and TV-Out enabled. The display resolution of the TV-Out display doesn't matter.
2. On the main display of the iPad, there is a switch that will modify the view on the secondary display to use either Springs&Struts or Auto-Layout. In either case, there will be labels displayed in each corner of the secondary display, numbered clockwise from top-left. There will also be a label that is centered in the display.
3. If you switch between Auto-Layout and Springs&Struts, the layout of the secondary display should remain consistent.
4. Switch the simulator to Retina iPad, and repeat the same test.

Expected Results:
If you switch between Auto-Layout and Springs&Struts, the layout of the secondary display should remain consistent.

Actual Results:

Observe that the Springs&Struts display is laid-out correctly, but the Auto-Layout display is not. If you dump out the view hierarchy of the Auto-Layout display, it appears that the views were laid out based on the secondary display being retina when it is not.

Regression:
I dont know whether this is or is not a regression.

Notes:

sample code for openradar available at https://github.com/chucks/autolayout-second-display-bug

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!