title: How to hide a navigation bar from first ViewController in Swift?
body: <p>How can I hide a navigation bar from first ViewController or a particular ViewController in swift? </p>
  
  <p>I used the following code in <code>viewDidLoad()</code>:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      self.navigationController?.isNavigationBarHidden = true
  }
  </code></pre>
  
  <p>and also on <code>viewWillAppear</code>:</p>
  
  <pre><code>override func viewWillAppear(animated: Bool) {
      self.navigationController?.isNavigationBarHidden = true
  }
  </code></pre>
  
  <p>Both methods hide the navigation controller from all ViewControllers.</p>