Advertisement
neatekFb

How to change StatusBar color in XCode - Swift 3

Nov 4th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.73 KB | None | 0 0
  1. /*
  2. // Vladimir Zhelnov - neatek.pw - Web/iOS dev
  3. 1. Open plist.info
  4. Add - "View controller-based status bar appearance"
  5. Set it to "NO"
  6. 2. Open AppDelegate.swift
  7. Add into "*/func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:/*"
  8. */
  9. UIApplication.shared.statusBarStyle = .lightContent
  10. /* or */
  11. UIApplication.shared.statusBarStyle = .default
  12. /* 3. Open your UIView Class or something else
  13. Add "*/UIApplication.shared.statusBarStyle = .lightContent/*" (or default)
  14. Into "*/override func viewDidLoad()/*"
  15. Add "*/
  16. override func viewWillDisappear(_ animated: Bool) {
  17.    super.viewWillDisappear(animated)
  18.    UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent
  19. }
  20. /*"
  21. Done. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement