I am making a dark theme for my app, where all the background is black and text and controls are orange. I also want the status bar to correspond to this theme, but .lightContent
option, which is designed for dark backgrounds, returns white text color. I was wondering if it's at all possible to make status bar text something other than black or white (orange, in my case)?
Asked
Active
Viewed 1,017 times
1

Denys Triasunov
- 539
- 1
- 4
- 24
-
1There is no API that allows this in the iOS SDK. – rckoenes Jan 18 '18 at 11:38
-
I found a solution here https://stackoverflow.com/questions/19063365/how-to-change-the-status-bar-background-color-and-text-color-on-ios-7, but it comes with a warning that this can cause app rejection. So I guess there really is no legal way) – Denys Triasunov Jan 18 '18 at 11:42
-
No you can't ... If anyhow you changed your app may reject – Sarabjit Singh Jan 18 '18 at 11:42
-
@DenysTriasunov that is about the background not the text color. – rckoenes Jan 18 '18 at 11:43
-
http://jitu1990.blogspot.in/2017/06/background-color-of-status-bar.html – Jitendra Solanki Jan 18 '18 at 12:36
-
@JitendraSolanki it not about the background of the status bar, bit the text on the statusbar. You link is about changing the background. – rckoenes Jan 23 '18 at 12:22
1 Answers
1
It is not possible to change the status bar's text color as the apple provided only two colors for displaying status bar text which is white and black.
To display white text add the following stuff to your project Info.plist
View controller-based status bar appearance = false
Status bar style = Transparent black style (alpha of 0.5)
To display black text add the following stuff to your project Info.plist
View controller-based status bar appearance = false
Status bar style = Gray style (default) OR Opaque black style

Jayachandra A
- 1,335
- 1
- 10
- 21