title: function to hide the navigation bar in swift not working
body: <p>I'm trying to create a function to hide the navigation bar. this the code i have so far but i can not get it to work please help.</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
   helper.navbar()
  }
  
  
  //function file
  func navbar() -&gt; UINavigationController{
  
      let navigationController = UINavigationController()
     navigationController.navigationBarHidden = false
  
  return navigationController
  
  }
  </code></pre>