Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think the best solution is "don't do that". Instead of hoping that you can duplicate all of UIViewController's behavior without being rejected for using private API calls why not create non-UIViewController controller objects to manage your subviews? A "controller" is not necessarily a <code>UIViewController</code>.</p> <p>At a minimum you would need to override or mix in replacement getters for <code>parentViewController</code>, <code>splitViewController</code>, <code>navigationController</code>, <code>tabBarController</code>, and <code>interfaceOrientation</code> (and probably also <code>modalViewController</code>). For each property you would need to make sure that any private setter called by UIKit still works as expected and any changes to those values made by modifying UIViewController ivars directly are also correctly reflected in your implementations.</p> <p>You're also going to need to figure out how UIKit determines which UIViewController is currently active and should receive view controller lifecycle methods because you need to make sure that these are sent to your container view controller and not only to one of it's children.</p> <p>You will also have to hope that you haven't just constructed a situation which isn't supported by any of Apple's view controller classes. For example will any of them break if they have a <code>parentViewController</code> but their <code>navigationController</code>, <code>tabBarController</code>, and <code>splitViewController</code> are all nil?</p> <p>Finally you'll need to keep up with any changes to these private implementation details with every iOS release.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload