通过推送隐藏选项卡栏

问题描述:

我有一个 tabBar + NavigationViewController.标签栏具有带有单元格的集合视图(比如 view1),并且带有单元格的推海格被实现到另一个视图(比如 view2).

I have a tabBar + NavigationViewController. The Tab bar has collection view with cells(Say view1) and with cells a push seague is implemented to another view(Say view2).

view2 我想要一个 navBar 但没有标签栏.

我试过了

self.tabBarController?.tabBar.hidden = true,

对于view2来说效果很好,但是当我通过后退按钮返回view1 选项卡仍然隐藏(即使在 view1 类我添加了 self.tabBarController?.tabBar.hidden = false>viewDidLoad 函数).

it worked fine for view2 but when I went back to view1 by back button the tab was still hidden( even after in view1 class I added self.tabBarController?.tabBar.hidden = false in viewDidLoad func).

如何让标签栏重新出现在 view1 中?

How can i make the tab bar reappear in view1?

我正在快速工作.

确保仅在其选项卡的 ViewController 上选中此选项您希望隐藏的栏.

Make sure to check this option only on the ViewController whose tab bar you wish to be hidden.

感谢 iHarshil 的建议.