How do I make the iPhone status bar transparent in Swift?

Viewed 16783

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 viewDidLoad():

self.navigationController?.setNavigationBarHidden(true, animated: true)

Also, how can I re add the back button to the the navigation bar?

Thanks!

Screen shot of my current iPhone simulator:

enter image description here

Screen shot after add Mohy Gh's code

Edited after Mohy Gh's Code:

1 Answers
Related