0

Suppose I have an app that STARTS with a UIViewController. But IF the user presses a button on that UIViewController, I want the app to switch over to a UITabBarController interface.

I'm working in storyboards, and I can't seen to create this kind of setup?

K2Digital
  • 603
  • 3
  • 10
  • 20
  • why you can't see to create this kind of setup? – Preetam Jadakar Dec 09 '13 at 06:03
  • This can't be done as explained well in below, alternatively You can try by initialising with UINavigationController, Check my Answer Here **http://stackoverflow.com/questions/16351348/example-for-login-screen-modally-based-on-storyboard/16351631#16351631** – Kumar KL Dec 09 '13 at 06:52

1 Answers1

4

Though you can add a tabBarController as a child of another viewController,it's not recomended practice of using tabbarController,You must use UITabBarController as rootViewController i.e. root of your window.

The Views of a Tab Bar Controller Because the UITabBarController class inherits from the UIViewController class, tab bar controllers have their own view that is accessible through the view property. When deploying a tab bar interface, you must install this view as the root of your window. Unlike other view controllers, a tab bar interface should never be installed as a child of another view controller.

Have a look at: https://developer.apple.com/library/ios/documentation/uikit/reference/UITabBarController_Class/Reference/Reference.html

Preetam Jadakar
  • 4,479
  • 2
  • 28
  • 58
  • obviously...viewController with root arrow on storyboard is only parent other are child of the same. it is hierarchical like tree in datastructure.. – Preetam Jadakar Dec 09 '13 at 06:27