Presentation controller responsibilities

Originator:douglashill
Number:rdar://22394246 Date Originated:23-Aug-2015 04:24 PM
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification:Other bug Reproducible:
 
Summary:
This is a proposal about API design. You probably have better insight into this than I do.

I am assuming adaptivity between arbitrary presentation controllers is possible. See bug 22394182. (We currently do this by dismissing and re-presenting when the size or trait collection changes.)

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

Expected Results:
I think adaptivity should be the responsibility of a different object to the presentation controller, possibly the transitioning delegate (which is the object originally responsible for choosing the presentation controller). The benefit of this is that the presentation controller is only responsible for managing its own presentation.

Actual Results:
In UIKit, view controller presentation adaptivity is the responsibility of the presentation controller (even if it delegates this it comes back to the presentation controller).

As it currently is, you provide a primary presentation controller which then provides other presentation controllers for adaptivity. This feels odd, because the decision about which is primary is arbitrary.

Version:
iOS 9 beta 5

Notes:
I attached diagrams showing how I view the current chain of object creation, and my proposed change. (I only show two presentation controllers, but there could be more.)

Configuration:
N/A

Attachments:
'Existing creation chain.pdf' and 'Proposed creation chain.pdf' were successfully uploaded.

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!