Why TabBar hides after the segue?

2019-06-04 08:23发布

I have the next structure:

* TabBarController
    - ViewController with TableView
        - ViewController

When I select any row on the TableView, the segue forwards me to the ViewController. On the ViewController with the TableView, I see the BottomBar, but after the segue it disappears.

How can I keep it on my ViewController? I've even putted the last ViewController in NavigationController, but it did not help me, too.

How can I fix it?

2条回答
贪生不怕死
2楼-- · 2019-06-04 08:51

Your hierarchy should look like this:

* TabBarController
  - NavigationController   
    - ViewController with TableView
      - ViewController

Using a Show segue with an UINavigationController pushes the destination view controller onto the navigation stack. However, most other view controllers present the view modally (i.e. by sliding over the source view controller) with Show, which is why your tabbar disappears.

查看更多
ら.Afraid
3楼-- · 2019-06-04 09:14

uncheck hide bottom bar when pushed from your view controller in story board

查看更多
登录 后发表回答