alexzhirkevich / compose-cupertino

Compose Multiplatform UI components for iOS (Cupertino Widgets)
Apache License 2.0
1.05k stars 35 forks source link

Fix SystemBar content color before IOS 17 #19

Closed Lavmee closed 8 months ago

Lavmee commented 8 months ago

fix #18

Result (1-2 sim, 3-4 real): image image image image

alexzhirkevich commented 8 months ago

Will it work like before on iOS 17 if you set light theme and full black screen?

alexzhirkevich commented 8 months ago

And could you also please check if it will work if you use this insted:

viewController.overrideUserInterfaceStyle = if (dark) 
    UIUserInterfaceStyle.UIUserInterfaceStyleDark 
else UIUserInterfaceStyle.UIUserInterfaceStyleLight

It should work without plist property and set correct keyboard and nav strip appearance

Lavmee commented 8 months ago

i tried overrideUserInterfaceStyle but it doesn't work.

LaunchedEffect(dark) {
        viewController.overrideUserInterfaceStyle = if (dark)
            UIUserInterfaceStyle.UIUserInterfaceStyleDark
        else UIUserInterfaceStyle.UIUserInterfaceStyleLight
        viewController.setNeedsStatusBarAppearanceUpdate()
    }
Lavmee commented 8 months ago

Will it work like before on iOS 17 if you set light theme and full black screen?

Yes, it works, the only problem I noticed is when opening bottomsheet with a light theme.

alexzhirkevich commented 8 months ago

Thanks! Status bar style for bottom sheet is complex because of different presentation styles and detents. I'll probably do it later