AutoLayout with scaled views broken under Mavericks

Originator:kai
Number:rdar://14764474 Date Originated:17-Aug-2013 10:11 AM
Status:Open Resolved:
Product:OS X Product Version:10.9 13A538g
Classification:Serious Bug Reproducible:Always
 
Summary:

If a view is scaled (using -[NSView setBoundsSize:], auto layout does not correctly position its sub views. 

Steps to Reproduce:

Build and run the attached project. The window contains two nested views. Constraints are set up so the inner view fills the outer view completely (connecting all four sides with 0 distance).

Select "Scale Outer View" from the View menu. This calls -setBoundsSize: on the outer view with half the actual bounds value.

Everything inside the outer view is now scaled down by a factor of two, as can be seen for the label in the inner view center.

Expected Results:

The inner view should still fill the outer view completely as called for by the constraints.

Actual Results:

The inner view has only half the size of the outer view, sitting in the lower left corner. Resizing the window shows that this relation is kept.

Regression:

Works as expected under Mountain Lion.

Notes:

This is a serious problem for us. We based our whole window and content layout on auto layout and need view scaling for zooming. This seems now broken under Mavericks, and we are not aware of any straight forward workaround.

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!