QLPreviewView resizing doesn't work with auto-layout
| Originator: | curtis.clifton | ||
| Number: | rdar://12794367 | Date Originated: | 12/2/2012 |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.8.2 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: A QLPreviewView in a window with auto-layout will not automatically resize when its containing view is resized by auto-layout.
Steps to Reproduce:
1. Build and run the attached project.
2. Resize the window, noting that the preview image resizes with the window.
3. Turn on Use Auto Layout in MainMenu.xib (using the File Inspector).
4. Re-build and run the project.
5. Resize the window, noting that the preview image no longer resizes.
6. Edit CCQLRPreviewView, uncommenting the override of resizeWithOldSuperviewSize:.
//- (void)resizeWithOldSuperviewSize:(NSSize)oldSize;
//{
// [super resizeWithOldSuperviewSize:oldSize];
//
// NSView *subview = self.subviews[0];
// [subview setFrameSize:self.frame.size];
//}
//
7. Re-build and run the project.
8. Resize the window, noting that the preview image once again resizes with the window.
Expected Results:
Steps 5-7 shouldn't be necessary. QLPreviewView's resizeWithOldSuperviewSize: should do the right thing in the presence of auto-layout.
Actual Results:
The steps are necessary.
Regression:
No.
Notes:
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!