Joshua Frank
Joshua Frank

Reputation: 13828

NavigationController inside TabBarController, or vice versa?

I apologize if this is simple or answered elsewhere, but I can't seem to find it.

I'm building a tabbed app in which some (but not all) tab views need navigation. Should I:

1) Use a UITabBarController root controller in which the navigation subviews are themselves UINavigationController instances.

2) Use a UINavigationController root controller, containing a TabBar instance, and hide the bar navigation when on a tab that doesn't need navigation services.

3) A totally different architecture.

?

Upvotes: 1

Views: 252

Answers (1)

rdelmar
rdelmar

Reputation: 104082

If I understand your choices, you want to do #1. The view controllers that are connected to the tabs can be navigation controllers. In a storyboard, you can start with the tabbed application template, and delete the view controller that's given to you by default, drag in a UINavigationController, and reconnect it to the tabBarController with a relationship segue.

Upvotes: 2

Related Questions