Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can create a new <code>UITabBarController</code>, and add it's view as a subview of your applications window. Then, add your other view controllers (for your "About" and "Saved Searches" sections) to that tab bar controller.</p> <p>This can be done most easily in Interface Builder. In your <code>MainWindow.xib</code>, drag a Tab Bar Controller object onto the canvas. This will automatically create a tab bar with two items (one for each of the view controllers added). For each view controller under the tab bar controller, go to the identity inspector and change its class to your custom view controller subclass. Then, show the attributes inspector and there is a field "NIB Name" - again, set this to the appropriate nib name. Your custom controller views will then be loaded from their corresponding nib files. All that's left to do is name each tab in Interface Builder, and give it a graphic.</p> <p>You can also do this programmatically if you don't like IB, by assigning the custom view controllers to the tab controller's <code>viewControllers</code> property, and assign a <code>selectedViewController</code>.</p> <p>Hope this helps. <br></p> <p><strong>EDIT</strong></p> <p>Thought it might be helpful to show a little hierarchy! Your <code>MainWindox.xib</code> structure might look something like this:</p> <ul> <li>AppDelegate</li> <li>UIWindow</li> <li>UITabBarController</li><ul> <li>UITabBar</li> <li>AboutViewController (view loaded from "AboutViewController.xib")</li> <ul> <li>Tab Bar Item - About</li> </ul> <li>UINavigationController</li> <ul> <li>Navigation Bar</li> <li>SavedSearchesViewController - Root View Controller (view loaded from "SavedSearchesViewController.xib"</li> <li>Tab Bar Item</li> </ul> </ul> </ul> <p>And push appropriate view controllers from SavedSearchesViewController as normal to provide navigation content.</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