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)?
-
1There is no API that allows this in the iOS SDK.rckoenes– rckoenes2018-01-18 11:38:40 +00:00Commented Jan 18, 2018 at 11:38
-
I found a solution here stackoverflow.com/questions/19063365/…, but it comes with a warning that this can cause app rejection. So I guess there really is no legal way)Denys Triasunov– Denys Triasunov2018-01-18 11:42:02 +00:00Commented Jan 18, 2018 at 11:42
-
No you can't ... If anyhow you changed your app may rejectSarabjit Singh– Sarabjit Singh2018-01-18 11:42:42 +00:00Commented Jan 18, 2018 at 11:42
-
@DenysTriasunov that is about the background not the text color.rckoenes– rckoenes2018-01-18 11:43:36 +00:00Commented Jan 18, 2018 at 11:43
-
jitu1990.blogspot.in/2017/06/…Jitendra Solanki– Jitendra Solanki2018-01-18 12:36:57 +00:00Commented Jan 18, 2018 at 12:36
|
Show 1 more comment
1 Answer
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
