Storyboard - Hiding top bar of navigation controller programmatically

前端 未结 8 733
失恋的感觉
失恋的感觉 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
        }
    
    0 讨论(0)
  • 2020-12-13 14:46

    I hide my Navigation bar by unchecking Bar Visibility "Shows Navigation Bar" In Attribute Inspector.Hope this help someone.

    0 讨论(0)
提交回复
热议问题