title: ios 11 custom navbar goes under status bar
body: <p>just downloaded xcode 9 and i'm having this weird issue, on ios 11 my custom navbar appears to be half in size and is under the status bar, on ios 10 works fine.</p>
  
  <p>so here is my code </p>
  
  <pre><code>let newNavbar: UINavigationBar = UINavigationBar(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: 64))
  let navItem = UINavigationItem()
  
  //create and assign the items
  
  newNavbar.setItems([navItem], animated: false)
  view.addSubview(newNavbar)
  </code></pre>
  
  <p>here is a screenshot, ios11 on the left and ios10 on the right,</p>
  
  <p><a href="https://i.stack.imgur.com/jbs9g.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jbs9g.png" alt="enter image description here"></a></p>