PreferredContentSize is not respected upon rotation in Modal Views presented via Form Sheet on iPad
| Originator: | ooklac | ||
| Number: | rdar://19517616 | Date Originated: | Jan 19, 2015 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | |
| Classification: | Reproducible: | 100% |
Summary: When presenting a view modally using the Form Sheet presentation style, the preferredContentSize is not respected after device rotation. Only tested on iPad. Steps to Reproduce: See attached project. 1) Have View Controller (let’s call it VCA) present another view controller (let’s call it VCB) modally. 2) Set the presentation Style to Form Sheet 3) In VCB, set the preferred content Size. In the attached example, it is set in viewDidLoad and set to a Size just smaller than full screen. 4) When running, rotate the device. If not rotated to an orientation of the same size, VCB’s preferredContentSize will not be respected. Expected Results: When rotated, VCB’s view will be in the preferredContentSize. Actual Results: When rotated, VCB’s size is the default formSheet view size. Regression: Always occurs in 8.1 on iPad, haven’t tested others. Notes: No rotation events are delivered to VCB. Workaround is something akin to : self.view.superview.frame = CGRectMake(…); in viewWillLayoutSubviews
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!