Search code examples
uinavigationcontrolleruitabbarcontrolleruitabbar

UITabBar inside UINavigationController programmatically?


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 :)


Solution

  • 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.