【iOS(swift)笔记-4】Push页面隐藏tabor,Pop回来自动显示tabbar(这样tabbar就不会有从下往上弹出的动作)

先设置hidesBottomBarWhenPushed = true然后紧接着在跳转页面的代码后设置hidesBottomBarWhenPushed = false


self.hidesBottomBarWhenPushed = true

self.navigationController?.pushViewController(LoginViewController(), animated: true)

self.hidesBottomBarWhenPushed = false


注意虽然self.tabBarController?.tabBar.isHidden=false可以显示tabbar,但是会有弹出的动作。

猜你喜欢

转载自blog.csdn.net/xihuandaxiaojie/article/details/79333855