There really is no good way to do this. The various subroutines UINavigationController and UITabBarController are private, and attempts to work with them are likely to work incorrectly. And Apple doesnβt give us the tools to create container view controllers, so you cannot easily embed the UINavigationController / UITabBarController in another view controller or recreate the UINavigationController / UITabBarController yourself.
The best thing is probably to go ahead and try to create your own container controller and handle some things that do not work correctly. In particular, the parentViewController built-in view parentViewController will return zero, so various other elements on the built-in view controller or its subcontrollers will be broken (for example, the interfaceOrientation property will be incorrect, presentModalViewController:animated: may not work correctly). Other things may also be broken.
Or you can wait until some future version of iOS actually supports us for creating container controllers (if at all), and then only supports this version before.
Anomie
source share