1. Dave Vedder
  2. NaviTab

Overview

HTTPS SSH

NaviTab

A sample project showing a UINavigationController inside a UITabBarController

Step by Step

  1. Create new project from Tab Bar Application template.
  2. Add new Class to your project that is a UITableViewController delegate (right click->New File -> UIViewController template -> pick Sublcass of: UITableViewController) Name it 'NavigationRoot' or something
  3. Click on MainWindow.xib, and get into the expanded left view so you can drill down into things.
  4. Expand the Tab Bar Controller so you can see the Tab Bar and the two View Controller objects in there (First View Controller and Second View Controller)
  5. From the Library, drag in a Navigation Controller and nest it inside the Tab Bar Controller in-between the existing ones or before or after them: choose your own adventure! (you can delete either or both of the "stock" ones if you want.)
  6. You will see a second view looking thing pop up in your editor. Do not panic, this is fine.
  7. Expand the NAvigation Controller you just added
  8. Click on the View Controller - Root View Controller, and in the inspector, change the class to NavigationRoot.
  9. Edit your NavigationRoot.m file to give your table a row with some witty text.
  10. Run your project in the simulator. Hooray!
  11. Add another view controller, and edit your NavigationRoot.m to push it when you select your witty text row. (I am glossing over this step since I'm guessnig you know how to do it.)
  12. Run your project again!
  13. Enjoy!