-
Notifications
You must be signed in to change notification settings - Fork 5
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
Sheet background does not respect app's theme #9
Comments
@SylarRuby I didn't notice the issue. As a workaround, you can specify color theme for all windows in windowScene like this. let scenes = UIApplication.shared.connectedScenes
let windowScene = scenes.first as? UIWindowScene
windowScene?.windows.forEach({ window in
window.overrideUserInterfaceStyle = userInterfaceStyle
}) |
Hi @mtj0928 No problem and that workaround works just fine. Thank you! |
@SylarRuby I updated the API. From 0.0.4, you can access let window = ResizableSheetCenter.resolve(for: windowScene)?.window
// you can update the window here
window?.overrideUserInterfaceStyle = userInterfaceStyle |
Thank you! |
Hola. Thanks for provide the community with such an elegant sheet. No major issues, just something I've noticed.
The sheet's background changes when the system's theme changes: dark mode gives the sheet a dark color and light mode... white sheet. Apps can specify a theme in which the sheet does not respect. An example how an app could change the theme:
Should the system is set to dark mode and the app to light, the content sheet's background is still dark. Ok I could use the
.sheetBackground
modifier you've provided us, with a combination with@Environment(\.colorScheme) var colorScheme
. Seems a bit messy if we have many sheets within the app. Is there a way to make the sheet respect the app's theme? I'd rather not having to keep repeating this:The text was updated successfully, but these errors were encountered: