Presentation controller adaptivity is limited

Originator:futuretap
Number:rdar://23666672 Date Originated:25-Nov-2015 11:39 PM
Status:Duplicate/22394182/Open Resolved:
Product:iOS SDK Product Version:9.1
Classification:Other Bug Reproducible:Not Applicable
 
This is a duplicate of rdar://22394182

Summary:
UIPresentationController adaptivity only supports changing to a full screen presentation according to the container trait collection. This is rather limited. It would be nice to able to switch between arbitrary presentation controllers in response to trait collection and/or container size changes.

Our primary use-case is having a custom presentation controller for horizontally compact environments, and a popover otherwise. (We’re making an inspector very similar to iWork.)

Steps to Reproduce:
Try to do something cool with presentation controller adaptivity.

Expected Results:
More flexible adaptivity

Actual Results:
Limited adaptivity

Version:
iOS 9 beta 5

Notes:
Alternatives:

1. Use custom presentation controller (including subclassing UIPopoverPresentationController) and override viewWillTransitionToSize:withTransitionCoordinator: and/or willTransitionToTraitCollection:withTransitionCoordinator: and dismiss and then re-present the presented view controller, making any changes such as providing a different presentation style or presentation controller. Adaptivity becomes mostly the responsibility of the transitioning delegate, which I think is nice.

2. Use view controller containment. The sledgehammer.

3. Override `_presentationControllerForTraitCollection:`. This seems to work, but is not suitable for production. It’s still only responsive to the trait collection, not the container size.

Configuration:
N/A

Attachments:

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!