title: Navigation bar not showing over TableView
body: <p>I can't explain why this code is not working. For some reason the navigation bar is translucent and the contents of the tableView are scrolling over it.</p>
  
  <p>here is the code of the Button</p>
  
  <pre><code> let outlineViewController = OutlineTableviewController()
          outlineViewController.pdfOutlineRoot = pdfoutline
          outlineViewController.delegate = self
  
          let nav = UINavigationController(rootViewController: outlineViewController)
          self.present(nav, animated: true, completion:nil)
  </code></pre>
  
  <p>here is the code of the tableView</p>
  
  <pre><code>super.viewDidLoad()
  
      let newBackButton = UIBarButtonItem(title: "Cancel", style: UIBarButtonItemStyle.plain, target: self, action: #selector(dismissView))
  
      self.navigationItem.rightBarButtonItem = newBackButton
  
      navigationController?.navigationBar.backgroundColor = UIColor(red:0.00, green:0.51, blue:0.78, alpha:1.0)
  
  
     self.tableView.dataSource = self
     self.tableView.delegate = self
  
     tableView?.register(UINib(nibName: "OutlineTableViewCell", bundle: nil),
                          forCellReuseIdentifier: "OutlineTableViewCell")
  }
  </code></pre>
  
  <p>and here is the result:
  the background color is not showing and the table goes under the navigationbar.</p>
  
  <p>What am I missing?</p>
  
  <p><a href="https://i.stack.imgur.com/7umVn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7umVn.png" alt="enter image description here"></a></p>