NSBox on a layer-backed view does not respond correctly to frame resizes
| Originator: | kastansn | ||
| Number: | rdar://15910647 | Date Originated: | 01/26/2014 |
| Status: | Closed | Resolved: | |
| Product: | OS X SDK | Product Version: | 10.9 |
| Classification: | Other | Reproducible: | Always |
Summary: When adding a vertical line NSBox as a subview of a layer-backed view it does not respond to requests resizing its frame unless its layer-backed superview is set to "autoresizeSubviews". The bug is that it should make no difference if its superview is layer-backed or not. Steps to Reproduce: 1. Have an NSView that you enable layer-backing on with setWantsLayer:YES 2. In Interface Builder or by code add a "Vertical Line" NSBox element to this view 3. Adjust that vertical line's frame by setting a new frame in code with setBounds: or setFrame: 4. Observe that there is no visual change of the vertical line's frame 5. Repeat steps 2 to 4 with a NON-layer-backed view. Observe that the vertical line changes its frame correctly. Expected Results: The NSBox should adjust its frame according to the values set by setFrame: or setBounds:. It should make no difference if its superview is layer-backed or not. Actual Results: The NSBox doesn't change its size at all, unless its superview is set to "autoresizeSubviews". When the superview isn't layer-backed "autoresizeSubviews" is not needed - as one would expect. Version: Xcode 5 / OS X 10.9.1 Notes: Possibly related to rdar://13059657
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!