Abhinav
Abhinav

Reputation: 38162

Changing the color of status bar

What is the guideline for changing the color of status bar. If I change its color, do I need to change the color of other UI widgets like Navigation bar etc.?

Upvotes: 1

Views: 2320

Answers (4)

invoodoo
invoodoo

Reputation: 3906

The best to add in view controller:

- (UIStatusBarStyle)preferredStatusBarStyle{ 
    return UIStatusBarStyleLightContent; 
}

Upvotes: 0

Ishu
Ishu

Reputation: 12787

[application setStatusBarStyle:UIStatusBarStyleBlackOpaque];
[application setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

you can use these for changing status bar in

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 

this method

automatially change in UI widgets.

Upvotes: 2

BoltClock
BoltClock

Reputation: 724392

There is no guideline specifically for how you should match your status bar color with your user interface colors.

If you feel a black/dark navigation bar should go with a black status bar, by all means set the navigation bar's tintColor as such. If you feel that you want your app to have a black status bar regardless of the color scheme, Apple will not stop you from doing that either.

You can design your app however you like, as long as it doesn't stray too far from the general iOS human interface guidelines.

Upvotes: 1

WrightsCS
WrightsCS

Reputation: 50727

If you change the color of the UINavigationController, then the corresponding buttons, like Back and any other additional buttons will automatically be changed as well. Same goes for the UIToolBar.

As far as the "Status Bar" which houses the clock, battery info, etc. You don't necessarily need to change anything else in your app. Typically if you have a darker themed appearance, you would want to use a darker StatusBar, it's really your preference, but you would want to go with what looks best and would be understandable by thge typical user.

Upvotes: 1

Related Questions