View Full Version : How to use tab bar within a navigation based app

Nov 7, 2009, 11:44 AM

I already have a navigation based app working. At one point, i have a table listing some items. If you select any of this items, a view controller is pushed onto the navigation stack, initializated with a xib file (have 4 different ones, as well as one view controller for each), depending on the "kind" of the item selected.

Now, i need to manage that this items could be of more than just one kind, so i need to load a tab bar with as many items as kinds have the item selected. Pressing one of the items of the tabbar should then load the corresponding kind xib.

I can't figure out how to use tab bar/tab bar controller/tab bar delegate to get this done. I have read a lot about it, but i just don't get it clear. I am also very confused about what should i do in the IB and programatically. Do i have to create a new xib with a new view controller to manage the tab bar? Do i have to use a tab bar controller? Do i have to phisically create them in the new xib, or should this be done programatically?

Please some help (i would REALLY appreciate some code) about this? I really need to get this done.

Nov 7, 2009, 04:29 PM
The common consensus for mixing a tab-bar and a navigation-controller is to start with the tab-bar application first and then add the navigation-controller into the mix.

Here's the first part of a two-part tutorial that might help you out:
How to embed a navigation controller inside a tab bar controller (http://twilloapp.blogspot.com/2009/03/how-to-embed-navigation-controller.html)