1

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)?

enter image description here

6
  • 1
    There is no API that allows this in the iOS SDK. Commented 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) Commented Jan 18, 2018 at 11:42
  • No you can't ... If anyhow you changed your app may reject Commented Jan 18, 2018 at 11:42
  • @DenysTriasunov that is about the background not the text color. Commented Jan 18, 2018 at 11:43
  • jitu1990.blogspot.in/2017/06/… Commented Jan 18, 2018 at 12:36

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.