0

I'm a beginner with iOS app development and want to customize the Status Bar colour. I have set my scene to a dark background and I want to battery and time in the Status Bar to match the colour.

At the moment I have added

var navigationBarAppearace = UINavigationBar.appearance() UIApplication.shared.statusBarStyle = .lightContent

in AppDelegate.swift

Is there a way to add a custom hex colour for the text, not background?

Azul_Falcone
  • 113
  • 5
  • Possible duplicate of [iOS Custom Status Bar Background Color not displaying](http://stackoverflow.com/questions/30341224/ios-custom-status-bar-background-color-not-displaying) – Istiak Morsalin Feb 11 '17 at 13:54

1 Answers1

0

I'm afraid there isn't without accessing private API's, which will get your app declined from apple review. It's best to just find a way to make your app design work with the given, white or black status bar style.

The one thing you could do is create your own status bar that imitated the UIStatusBar, with your own labels and icons, but that would be a reasonable amount of hassle.

TimWhiting
  • 2,405
  • 5
  • 21
  • 41