Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status bar hides in iOS 7 when UIViewControllerBasedStatusBarAppearance is enabled #186

Closed
stevenp opened this issue Aug 30, 2013 · 6 comments

Comments

@stevenp
Copy link

stevenp commented Aug 30, 2013

The default behavior on iOS 7 is UIViewControllerBasedStatusBarAppearance, which allows each view controller to determine the status bar behavior. In this default case, when the new window is created and shown for the hud, even though it is supposed to have "clearColor" as the background, it's opaque and it doesn't appear that there is any way to change that (at least that I've discovered so far).

The workaround is to set UIViewControllerBasedStatusBarAppearance to NO in your Info.plist and manually control the status bar appearance in each view controller, but it would be nice if SVProgressHUD still worked with the new default behavior.

@getaaron
Copy link
Contributor

getaaron commented Sep 4, 2013

@stevenp Can you post a screen shot of this behavior?

@stevenp
Copy link
Author

stevenp commented Sep 4, 2013

Before:
ios simulator screen shot sep 4 2013 2 37 14 pm

During HUD being displayed:
ios simulator screen shot sep 4 2013 2 37 21 pm

After HUD is dismissed:
ios simulator screen shot sep 4 2013 2 37 24 pm

@rocket0423
Copy link

I'm running into this issue as well the problem is with using the UIWindow for SVProgressHUD it always uses the UIStatusBarStyleDefault style which is black. The UIWindow is the top controller so it is the controller that is setting the StatusBarStyle. The only thing to do is the workaround that stevenp suggested, setting UIViewControllerBasedStatusBarAppearance to NO and using [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES] in each controller to set the style

@getaaron
Copy link
Contributor

getaaron commented Sep 6, 2013

Could SVProgressHUD set the UIWindow's rootViewController to a full-screen view controller with a backgroundColor = [UIColor clearColor]? This view controller could implement preferredStatusBarStyle.

@samvermette
Copy link
Contributor

Fixed in #189

@onmyway133
Copy link

@samvermette Sorry, I can't see pull request #189 having anything related to this issue? Can you please tell us the reason for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants