tags:

views:

24

answers:

1

What would I put into my root controller in an application that will have multiple tabs, where is tab is a navigation controller?

Do I create derived classes of the navigation controller, where each one manages its own view controllers and the root manages the tabbar and list of navigation controllers?

A: 

I believe the "Tab Bar Application" template in XCode will get you started on this.

Once created, your MainWindow.xib file (under "Resources" in the project file) should have a single UITabBarController, which is added to the UIWindow in the code in applicationDidFinishLaunchingWithOptions: in your application delegate.

So, the app delegate only "knows" about the Tab Bar Controller. Then, in Interface Builder, you can specify a separate XIB file to load for each tab. In those XIB files, you would want a UINavigationController.

If you do it this way, the UITabBarController will take care of instantiating all of the UINavigationControllers for you (nice!).

phooze