Tab Bar Controller is not in all UIViewControllers

2019-08-03 03:20发布

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条回答
Summer. ? 凉城
2楼-- · 2019-08-03 04:04

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.

查看更多
登录 后发表回答