After I update to iOS 15 Xcode 13 the following code is not working anymore, is there any new way to change the color of the navigation bar items on iOS 15?
(Updated: I use SwiftUI)
let appearance = UINavigationBarAppearance()
appearance.configureWithTransparentBackground()
appearance.backgroundColor = .systemBackground
appearance.titleTextAttributes = [.foregroundColor: UIColor.label]
appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]
UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().compactAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance appearance
UINavigationBar.appearance().tintColor = .label
-- Updated at 2021.10.18 --
Expected:
Actual:
My code works fine in light mode. However my code does not works in dark mode on iOS 15.




