AutoLayout breaks NSView's setFrameCenterRotation pivot point

Originator:ewmailing
Number:rdar://12258628 Date Originated:2012-09-07
Status:Open Resolved:
Product:Mac OS X Product Version:10.8
Classification:Other Bug Reproducible:Always
 
07-Sep-2012 04:17 PM Eric Wing:
Summary:
Using NSView's setFrameCenterRotation: method produces incorrect results when Auto Layout is enabled. The API is supposed to cause the view to rotate around the center of the view. But with Auto Layout enabled, it rotates around the bottom-left corner of the view. (setFrameRotation is supposed to rotate along the bottom-left corner, not setFrameCenterRotation)



Steps to Reproduce:
Attached are two sample projects. "RotateViewOld" is without AutoLayout. "RotateViewAutoLayout" is with AutoLayout enabled in the XIB. The "Old" version shows the correct behavior. Note that the "AutoLayout" behavior does not match.


Expected Results:
Button should rotate around its center when you click the button.

Actual Results:
The AutoLayout version rotates around the bottom-left corner of the button.

Regression:
I think it is broken in 10.7 too.




'RotateViewBug' uploaded at https://github.com/ewmailing/MyAppleBugs

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!