Storyboard - Hiding top bar of navigation controller programmatically

前端 未结 8 737
失恋的感觉
失恋的感觉 2020-12-13 14:11

I\'m using a storyboard and I\'m trying to hide a top bar of my main navigation controller when a certain button is pressed (or function is called). I know I have to initial

8条回答
  •  既然无缘
    2020-12-13 14:42

    in swift 4:

    self.navigationController!.navigationBar.isHidden = true
    

    something like this:

    override func viewDidLoad() {
            super.viewDidLoad()
           self.navigationController!.navigationBar.isHidden = true
        }
    

提交回复
热议问题