0

I have a specific view in my application where I need the status bar to be white (dark mode).

I've tried setting the .preferredColorScheme(.dark) but as the documentation mentions, that affects all the views in my window which is not what I'm looking for.

I've taken a look at this but it seems to be done using SceneDelgate which I am not making use of.

Is there any workaround to this?

Zaheer Moola
  • 133
  • 10

1 Answers1

0

For iOS 16, you can set .toolbarColorScheme for a specific View. Unfortunately, this is not supported on older iOS Versions. As a workaround that does not involve SceneDelegate, you could manipulate UIToolBar.appearance() directly with a new tint color. This has nothing to do with the preferred color scheme (e.g., light or dark mode), but could have the same effect.

a_hausb
  • 161
  • 1
  • 9