2019独角兽企业重金招聘Python工程师标准>>>
/// 重写push方法
override func pushViewController(_ viewController: UIViewController, animated: Bool) {
// 判断 childViewControllers.count 如果 > 0 说明不是栈底页面,需要显示,其他的隐藏
if childViewControllers.count > 0 {
// 设置push后隐藏tabbar
viewController.hidesBottomBarWhenPushed = true
}
super.pushViewController(viewController, animated: animated)
}