Relationship segues should be available for UIKit users

Originator:google
Number:rdar://41061223 Date Originated:12-Jun-2018 05:22 pm
Status:Open Resolved:
Product:iOS + SDK Product Version:All
Classification:Enhancement Reproducible:Always
 
Summary:
When configuring container view controllers provided by Apple, it's possible to define "relationship segues". The key difference with these segues is that they allow a container to instantiate child view controllers without loading their views, allowing the container to decide the most appropriate time to load child views.

When creating custom container view controllers, it's not possible to define relationship segues. This means that containers either have to a) couple instantiation with loading views by using normal segues, removing a level of control over view loading, or b) eschew segues and perform view controller instantiation and view loading in code.

The existence of relationship segues for privileged framework classes hints at the need to decouple view controller instantiation from view loading. The lack of support for relationship segues for third party code hampers the decomposition of the view controller hierarchy into smaller components, and discourages the use of storyboards for more advanced use cases.

Steps to Reproduce:
Create a storyboard with two view controllers, and attempt to create a relationship segue between them.

Expected Results:
Expected to be able to define relationships between view controllers and control view loading in the container view controller class.

Actual Results:
Only standard segues and embed segues are available.

Version:
All

Notes:
The Container View + Embed segue gets close, but is still limited, because the child view controller is not available to the parent when prepareForSegue() is called. This means it's not possible for containers to configure embedded child view controllers before their view is loaded.

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!