IOS7 Status Bar font color change

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

The original from here: iOS7 Status Bar font color change.

The old project encountered status bar font color need to be revised, symptoms are as follows: in the iOS7 navigation bar set to black, iPhone font color status bar will automatically become white, but the font color status in the iPad bar or the black, so we don't know.

In order to find out the reasons, a Mater-Detail template project built, to observe the status under the bar color change, as shown in Fig.:


iphone- default



ipad default


Visible by default, bar is white and transparent, status bar font is black. Then try to master bar modified black opaque:

[self.navigationController.navigationBar setBarStyle:UIBarStyleBlack];

[self.navigationController.navigationBar setTranslucent:NO];

Then observe:


iphone black



ipad black


At this time, the iPhone status bar automatically converted into white, while the iPad or black. Because only amended the Master nav bar, so iPad looks a little strange. Obviously, iOS7 status bar is associated with the current viewController. This reminds me of Apple UI Transition Guide:

So we have two kinds of Solutions:

1 calling setNeedsStatusBarAppearanceUpdate, then realize

-(UIStatusBarStyle)preferredStatusBarStyle,

Note that the iPad, window rootViewController SpliteViewController, we need to write a SpliteViewController subclass, the method in the subclass.

2 in the infoPlist UIViewControllerBasedStatusBarAppearance set to NO, then add in code.:

[application setStatusBarStyle:UIStatusBarStyleLightContent];


The final effect:


IPad modification


Master status bar font into white.

The above description of iOS7, status bar modified method. The most important point, is that iOS7 viewController can adjust the status bar style, this requests us in App design. Note that the background color of the navigation bar, using background images.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Tina at November 18, 2013 - 1:07 AM