Tab Bar Controller is not in all UIViewControllers

一个人想着一个人 提交于 2019-12-11 12:30:38

问题


I just created a tab bar controller in my project with 4 tabs in total.

It works fine between the 4 UIViewControllers.

However when I navigate to another UIViewController which is not one of the 4 tabs, the tab bar disappears.

I want it to be seen in every page. How can I do this?


回答1:


Ok.

The way this is done is by using navigation controllers on each tab.

So, you have your tab bar controller. Then each tab has a navigation controller first and the root view controller of the navigation controller is the page you want in that tab.

Now when you use a push segue the navigation controller pushes the new page and the tab bar controller remains in place.



来源:https://stackoverflow.com/questions/31087181/tab-bar-controller-is-not-in-all-uiviewcontrollers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!