alexzhirkevich / compose-cupertino

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

SystemBarStyle: Content color IOS 16.7 is always white #18

Closed Lavmee closed 8 months ago

Lavmee commented 8 months ago

On my test device (IPhone 8+, IOS 16.7) in the sample the content color of the StatusBar is always white. I think you should try using the following code:

UIApplication.sharedApplication.setStatusBarStyle(
        if (isDark) UIStatusBarStyleLightContent else UIStatusBarStyleDarkContent
    )
viewController.setNeedsStatusBarAppearanceUpdate()

Screenshot of the problem: image

alexzhirkevich commented 8 months ago

It works well starting from iOS 17. I don't have simulator/device on iOS 16. Could you please apply this changes, test it and submit a PR? It should be applied inside CupertinoTheme function i guess. As i remember, you also need to add an additional property to Info.plist to change status bar color programmatically

alexzhirkevich commented 8 months ago

It also affects navigation bar strip at the bottom on iphones without home button i guess.

image