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

[iOS14] Status bar color during Siren alert presentation #351

Closed
giofid opened this issue Oct 27, 2020 · 6 comments
Closed

[iOS14] Status bar color during Siren alert presentation #351

giofid opened this issue Oct 27, 2020 · 6 comments

Comments

@giofid
Copy link
Contributor

giofid commented Oct 27, 2020

Hi @ArtSabintsev, I'm experiencing a problem with status bar style/color. Only in iOS14 the status bar changes color during the Siren alert presentation.

siren
Siren-master.zip

As you can see, the status bar is black before the alert is shown, it becomes wrongly white during Siren alert presentation and it comes back black after the alert disappears.

If I comment the preferredStatusBarStyle overriding in SirenViewController class, the problem goes away.

What is the purpose of this overriding? Is it possible to remove it?

@ArtSabintsev
Copy link
Owner

ArtSabintsev commented Oct 27, 2020

It's needed to fix an issue on iOS 13, for which I do not recall the details. I can look into it a bit later.

There's also older reasons for it being there. There might be an exception we need to put in for iOS 14.

@ArtSabintsev
Copy link
Owner

Also, I think your screenshots maybe wrong based on your explanation?

@giofid
Copy link
Contributor Author

giofid commented Oct 28, 2020

I replaced the screenshots with a gif. I hope it's much clearer now. As you can see, the statusbar is initially black, it becomes white when alert appears and it comes back black after the alert disappears.

The problem occurs only on iOS14.

I also attach a slightly modified version of the demo that shows the problem.

Thank you.

@ArtSabintsev
Copy link
Owner

This should be fixed in v5.5.1 and beyond, which was just released.

Thanks!

@giofid
Copy link
Contributor Author

giofid commented Nov 10, 2020

Thank you @ArtSabintsev. The problem is now fixed!

Can I ask you what's the purpose of retaining the window in SirenViewController? I tried to comment this line and everything keeps working. Is this retain cycle no more needed?

@ArtSabintsev
Copy link
Owner

It was to fix this issue: #305

Also, I may need to revert this change I made in this PR in the future since it was apparently attempting to fix a SceneDelegate issue in iOS 13. I’ll wait to see if anyone reports that issue still existing.

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

No branches or pull requests

2 participants