Search code examples
iphoneobjective-cxcodeuitabbarcontrolleruitabbar

Add UITabBarController or similar User Interface View on the UIViewController other than rootViewController


I am trying to create an app that navigates from the rootViewController using UINavigationBar to the nextViewController which is UITabBarController or similar UIView with UITabBar with couple of UITabBarItems. So please suggest. Suggestions for both programmatic and using Interface Builder would be much appreciated. Thanks


Solution

  • If you read the Apple' docs you'll see that it's clear that Apple think that UITabBarController's should only be used as the root view controller.

    I believe the exception to this is perhaps where you have say an interim view controller for login before you enter the enter the app proper.

    If you want a tabBarController type behaviour inside a navigationController based app then you should probably be using UIViewControllers with UIToolBars inside UINavigationController and not a UITabBarController.