Implement UItabbarController + UInavigationBar in

2019-07-25 21:05发布

问题:

I have navigation controller based project. In my project I have Splash Screen & Login Screen where i have hidden the navigation controller.

Now i have to implement TabbarController in the application and It need to be shown the screen after Login Page.

I want to add it in AppDelegate.But my problem is that I have set rootviewcontroller of Window as navigation controller.

And Now i want to use Tabbar controller also into the Appdelegate class.

I am finding difficulty into it.

Any help will be appreciated a lot.

回答1:

What you can do is set the rootviewcontroller as a tabbarcontroller and add a tab for your login screen but make sure to hide the tabbar initially, after the user login, you can remove the tab programatically and show the tabbar.



回答2:

Maybe you really need that kind of navigation in your application, to me it sounds a bit of a unnecessary workaround and against guidelines. Try having a look at Apple's ("View Controller Programming Guide > Combined View Controller Interfaces") and maybe you'll find a more elegant solution to your problem.