Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. // <key>UIStatusBarHidden</key>
  2. // <true/>
  3. // <key>UIViewControllerBasedStatusBarAppearance</key>
  4. // <false/>
  5. // Specifies whether the view controller determines the status bar style.
  6. // See UIViewControllerBasedStatusBarAppearance for details.
  7.  
  8. // Previously one could just do something like this:
  9. override func viewDidAppear(_ animated: Bool) {
  10.  
  11. super.viewDidAppear(animated)
  12.  
  13. // set the status bar hidden at the application level
  14. // status bar will be hidden on all view controllers
  15. UIApplication.shared.isStatusBarHidden = true
  16. }
  17.  
  18. // as of iOS 9.0, isStatusBarHidden is deprecated
  19. // so, we have to override this method in our view controller:
  20. override var prefersStatusBarHidden: Bool {
  21. return true
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement