-1

How do I change the text color of the status bar? I know how to change the background color but not sure how to change the text color?

I need output like this:

enter image description here

I am not sure if it is at all possible under Apple HIG but just want to check if we could at all achieve this.

I have see this is done in the System App "Newsstand" . If you see the color is now exactly black or white. It is actually a light gray .

enter image description here

Bharat Jagtap
  • 1,692
  • 2
  • 22
  • 35
  • Possible duplicate of http://stackoverflow.com/questions/17678881/how-to-change-status-bar-text-color-in-ios-7 – JMarsh Mar 07 '14 at 15:37
  • @JMarsh I want to change the text color , when you make it LightCOntent it becomes white . Can you see in my case its not white . – Bharat Jagtap Mar 07 '14 at 16:57
  • I'm looking at the image above, it is white, I don't know what you're looking at, and please stop going through my question history and down-voting them. – JMarsh Mar 07 '14 at 19:42

3 Answers3

1

I Don't think you can change the text color of Status bar. @JMarsh its not duplicate que. The link you provided is for status bar style not for text.

GameBegins
  • 580
  • 7
  • 12
  • From the question in possible duplicate: "How can I change the status bar text color to white like it is on the home screen?" Most of the answers show you can only do white or black. – JMarsh Mar 07 '14 at 16:17
  • @JMarsh But that does not conclude that we can only have black and white as the text color on status bar . I already went through those questions before asking this . – Bharat Jagtap Mar 07 '14 at 17:00
  • It is very clear that you can only set the status bar colors to those defined types. You should have been able to conclude that in the first 2 or 3 results returned by Google, which I believe is the general consensus given the current rating of the question. – JMarsh Mar 07 '14 at 17:20
  • I gave a very valid comment for a question that is very easy to find the answer to, though I did not post an answer. Look at the answers here, I am not wrong. Chill out. – JMarsh Mar 07 '14 at 19:40
  • @JMarsh,your comment is valid. Apple is very stringent about look and feel of its product and Status bar style is no exception to that. – GameBegins Mar 10 '14 at 14:14
0

There are some options to specify the look of the UIStatusBarStyle. For a single UIViewController use this method:

-(UIStatusBarStyle)preferredStatusBarStyle{ 
   return UIStatusBarStyleLightContent; 
}

For the whole app:

[[UIApplication sharedApplication] 
   setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
Alex Cio
  • 6,014
  • 5
  • 44
  • 74
0

There are a couple different styles defined here:

https://developer.apple.com/library/ios/documentation/uikit/reference/UIApplication_Class/Reference/Reference.html#//apple_ref/doc/c_ref/UIStatusBarStyle

To invoke:

[[UIApplication sharedApplication] setStatusBarStyle:statusBarStyle animated:NO];
KellyHuberty
  • 238
  • 2
  • 10