Note that there are some explanatory texts on larger screens.

plurals
  1. POHow does Apple make its controllers contain other controllers?
    text
    copied!<p>The <a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html" rel="nofollow noreferrer">Apple documentation</a> gives the following warning regarding using View Controllers to manage part of a screen.</p> <blockquote> <p>Note: You should not use view controllers to manage views that fill only a part of their window—that is, only part of the area defined by the application content rectangle. If you want to have an interface composed of several smaller views, embed them all in a single root view and manage that view with your view controller.</p> </blockquote> <p>Now the strange thing is that Apple breaks this advice. <a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITabBarController_Class/Reference/Reference.html" rel="nofollow noreferrer">UITabBarController</a>, <a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UINavigationController_Class/" rel="nofollow noreferrer">UINavigationController</a>, <a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UINavigationController_Class/" rel="nofollow noreferrer">UISplitViewController</a> all go against this advice. There is a discussion on the <a href="http://discussions.apple.com/thread.jspa?threadID=2129903" rel="nofollow noreferrer">Apple forums</a> about what can go wrong if you ignore this advice.</p> <p>I found a <a href="http://blog.jayway.com/2009/03/22/uitoolbars-in-iphone-os-2x/" rel="nofollow noreferrer">tutorial</a> on how to do this, but the method had a problem with <a href="https://stackoverflow.com/questions/3767066/layered-uiviewcontrollers-overlaps-status-bar">overlapping the status bar</a> which had a fix that seemed kind of dodgy. Other questions have <a href="https://stackoverflow.com/questions/2526990/adding-a-uinavigationcontroller-as-a-subview-of-uiview">solutions that appear kind of dodgy</a> or <a href="https://stackoverflow.com/questions/1486832/how-to-add-an-uiviewcontrollers-view-as-subview">advise against doing it</a>.</p> <p>So given the question is what method does Apple use for its own controllers?</p>
 

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