I also ran into the same issue, since I also need to support iOS 13 in our project, I ended up making a condition view modifier
struct ToolbarMod: ViewModifier {
func body(content: Content) -> some View {
if #available(iOS 16.0, *) {
content
.toolbarBackground(.visible, for: .navigationBar)
.toolbarColorScheme(.light, for: .navigationBar)
} else {
content
}
}
}
That way the old behavior with preferredStatusBarStyle still works for pre iOS 16, and toolbarColorScheme is applied to iOS16. Thanks @cconway for the precision on toolbarBackground