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

xiaoxiao2021-02-28  41

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

self.hidesBottomBarWhenPushed = true

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

self.hidesBottomBarWhenPushed = false

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

转载请注明原文地址: https://www.6miu.com/read-2620443.html

最新回复(0)