-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix(ios): set dark statusbar style if defined in plist #2098
fix(ios): set dark statusbar style if defined in plist #2098
Conversation
When dark status bar style was defined in plist it wasn't remembered in statusBarStyle and as a result preferredStatusBarStyle always returned .default, which caused flicker of the status bar .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even with the if available, that will fail to compile on Xcode 10, which is still supported. You can use the raw value instead, I think I used it in Statusbar.swift, take a look.
Also, there are other possible values other than default, light and dark that behave as light , so the second if should be statusBarStyle != "UIStatusBarStyleDefault"
The linked issue is an android issue.
@jcesarmobile ok, I will make appropriate changes. I was focused mainly on latest xcode and ios, totaly forgot about older sdk ;-) And yes, #1761 was about android, but there was a comment #1761 (comment), that was reporting similar issue on ios, so that is why I mentioned about it. |
@jcesarmobile Done :-) |
@jcesarmobile Is it ok now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the code indentation as we use 2 spaces instead of 4, and added a TODO to remember to change the rawValue once Xcode 10 support is dropped.
Other than that looks good, will merge once tests finish. Thanks!
When dark status bar style was defined in plist it wasn't remembered in statusBarStyle and as a result preferredStatusBarStyle always returned .default, which caused flicker of the status bar . Partially closes #1761 (in terms of ios issues).