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

fix(ios): set dark statusbar style if defined in plist #2098

Merged
merged 3 commits into from
Nov 13, 2019

Conversation

MarkChrisLevy
Copy link
Contributor

@MarkChrisLevy MarkChrisLevy commented Oct 25, 2019

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).

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 .
Copy link
Member

@jcesarmobile jcesarmobile left a 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.

@MarkChrisLevy
Copy link
Contributor Author

MarkChrisLevy commented Oct 25, 2019

@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.

@MarkChrisLevy
Copy link
Contributor Author

@jcesarmobile Done :-)

@MarkChrisLevy
Copy link
Contributor Author

@jcesarmobile Is it ok now?

Copy link
Member

@jcesarmobile jcesarmobile left a 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!

@jcesarmobile jcesarmobile changed the title fix(ios): Remember dark statusbar style which was defined in plist fix(ios): set dark statusbar style if defined in plist Nov 13, 2019
@jcesarmobile jcesarmobile merged commit 2529015 into ionic-team:master Nov 13, 2019
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

Successfully merging this pull request may close these issues.

Splash Screen Messing Status Bar Color/Style
2 participants