通过推送隐藏选项卡栏 [英] hide tab bar in view with push

查看:38
本文介绍了通过推送隐藏选项卡栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 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 的建议.

这篇关于通过推送隐藏选项卡栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆