1
votes

I have the status bar set to UIStatusBarStyleLightContent and in all other devices (5, 5S, 6, 6 Plus) the status bar is showing in white text. The background color of my app is black, so the status bar has a black background, thats why I need the status bar text to be white.

So only when I test on the 4S does the status bar text show as black. Is this a known bug? Is there any work around on making the 4S have the correct status bar style?

This is why I have done

in AppDelegate:

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

    application.statusBarStyle = UIStatusBarStyleLightContent;
}

in each ViewController within my app I put this in viewDidLoad and add this method:

- (void) viewDidLoad {
    [self setNeedsStatusBarAppearanceUpdate];
}

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}

Also, in my info.plist I have this:

Status bar style = UIStatusBarStyleLightContent
1
are you using autolayout or multiple storyboards?Ricardo Alves
I am using auto layout but only one storyboard.. and I have also set each view controller to have light content as the status bar style in interface builderMSU_Bulldog

1 Answers

1
votes

Have you tried this?

Set "View controller-based status bar appearance" (UIViewControllerBasedStatusBarAppearance) to YES in your Info.plist. (YES is the default, so you can also just leave this value out of your plist.)