views:

337

answers:

1

Hi all, Im writing an app that has a navigation controller as it's main menu system but I need to be able to have a UITabBar appear inside the navigation controller when the user clicks one of the buttons on the main view. I have written everything programmatically so far so would like to keep it that way if possible.

So basically, how do I show a UITabBar inside the a navigation controller programmatically?

Many thanks :)

A: 

Depending on what you need to do you can either push a UITabBarController into the navigation controller or just add a UITabBar as a subview to a view that you need it on.

Joonas Trussmann
Hi Joonas, thanks for your reply. I'm sorry I'm a bit simple, can I use a UITabBar to show various views without a controller?Thanks
Mark McFarlane
Nope, you'd still need a controller of some kind. If you don't like UITabBarController you could always write your own, but in most cases that would be totally pointless.If you don't want to do all of this programmatically it'd be much easier to just set up a nib for the UITabBarController, init the controller with that and then just push it into your main nav controller.
Joonas Trussmann