为什么TabBar在隐藏之后隐藏? [英] Why TabBar hides after the segue?
问题描述
我有下一个结构:
* TabBarController
- ViewController with TableView
- ViewController
当我在TableView上选择任何行时,segue会将我转发到ViewController.在带有TableView的ViewController上,我看到了BottomBar,但在选择之后消失了.
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.
如何将其保留在ViewController上?我什至把最后一个ViewController放在了NavigationController中,但是它也没有帮助我.
How can I keep it on my ViewController? I've even putted the last ViewController in NavigationController, but it did not help me, too.
我该如何解决?
推荐答案
您的层次结构应如下所示:
Your hierarchy should look like this:
* TabBarController
- NavigationController
- ViewController with TableView
- ViewController
将 Show
segue与 UINavigationController
一起使用会将目标视图控制器推送到导航堆栈上.但是,大多数其他视图控制器使用 Show
模态显示视图(即通过在源视图控制器上滑动 ),这就是您的标签栏消失的原因.
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.
这篇关于为什么TabBar在隐藏之后隐藏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!