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

Respect system theme on an iOS app splash screen #4040

Open
terrakok opened this issue Dec 15, 2023 · 3 comments
Open

Respect system theme on an iOS app splash screen #4040

terrakok opened this issue Dec 15, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request ios submitted

Comments

@terrakok
Copy link
Collaborator

User report:

When running iOS app in dark mode, I see a white flash every time I enter a view that is using Compose MP. It appears to me that the UIView(Controller) and/or Skiko view is clearing with white even in dark mode. Would be nice if it at least used .systemBackground...

@elijah-semyonov
Copy link
Contributor

I believe it should have been fixed

@terrakok
Copy link
Collaborator Author

The issue should be fixed. If it's not, provide a reproducer here, please, and reopen the issue

@tylerwilson
Copy link

After more testing, I have determined this is likely a byproduct of our apps feature that allows you to set the light/dark theme from within the app. That is, if the app light/dark theme differs from the currently set OS theme, this is when we see the flash.

We are adjusting the app theme via this magic line of code:

UIApplication.shared.windows.first(where: \.isKeyWindow)?.overrideUserInterfaceStyle = .dark

So I suspect that the Compose or Skiko layer of code is checking or watching the trait value, which may not have changed, though the app is rendering in a different mode.

I am unsure if this is a case you need to want to handle, though it would be convenient for me. :-/ We may simply disable this feature until such time as it can be handled better.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ios submitted
Projects
None yet
Development

No branches or pull requests

4 participants