hide tab bar in view with push

前端 未结 7 1685
离开以前
离开以前 2021-02-03 22:51

I have a tabBar + NavigationViewController. The Tab bar has collection view with cells(Say view1) and with cells a push seag

7条回答
  •  孤街浪徒
    2021-02-03 23:12

    Bruno Fernandes's answer in Swift:

    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        if segue.identifier == "YourSegueIdentifier" {
            let destinationController = segue.destinationViewController as! YourViewController
            destinationController.hidesBottomBarWhenPushed = true
        }
    }
    

    This was the answer that worked for me. Putting hidesBottomBarWhenPushed in the viewDidLoad method didn't work.

    Thanks Bruno!

提交回复
热议问题