title: How do I make the iPhone status bar transparent in Swift?
body: <p>I am looking to hide the navigation and status bar to make it transparent. I have an image right below that I want to take up the entire space. So far, I got to hide the navigation bar but the status bar is still white- this is in the <code>viewDidLoad()</code>:</p>
  
  <pre><code>self.navigationController?.setNavigationBarHidden(true, animated: true)
  </code></pre>
  
  <p>Also, how can I re add the back button to the the navigation bar?</p>
  
  <p>Thanks!</p>
  
  <p>Screen shot of my current iPhone simulator:</p>
  
  <p><a href="https://i.stack.imgur.com/9adpB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9adpB.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/UdWVK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UdWVK.png" alt="Screen shot after add Mohy Gh&#39;s code"></a></p>
  
  <p>Edited after Mohy Gh's Code:</p>