Pregunta

I've got a little bit of an issue with the status bar for iOS7, iPhone 4 and up. Since my app's background is dark, I need the status bar to be white, which looks fine. However, when minimizing the app, waiting a few seconds and going back into the app, it slightly flashes from full white to darker white back to full white within a period of less than half a second.

You can reproduce this by simply creating an empty new XCode project, setting the statusbar to white (see below how I did that), then running the app on simulator or device, minimizing it and maximizing it again.

Things tried: UIViewController-based appearance with:

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}

and

- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {

    return UIStatusBarAnimationNone;
}

And view controller-based status bar appearance set to NO in the PLIST, with also: Transparent black style (alpha of 0.5)

Status bar is initially hidden set to NO in both situations.

Is this something out of my programmatic control?

¿Fue útil?

Solución

I had the same issue and solved it by setting on the info.plist file the following values, on iOS 10*:

Status bar style = UIStatusBarStyleLightContent

View controller-based status bar appearance = NO

If you prefer directly in your Info.plist:

<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>

<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top