I use appearance api to set a custom background image for my navigation bar. At the start color of the back button icon is black. But for some reason color becomes white when new screen is presented modally. My whole project is relied on the appearance api so I cannot remove or replace it.
Looks like a bug.
The setup code is simple:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
setupappearance()
return true
}
func setupappearance() {
let navImage = UIImage(named: "new_navigation_background1")
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundImage = navImage
UINavigationBar.appearance().scrollEdgeAppearance = appearance
UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().compactAppearance = appearance
UINavigationBar.appearance().compactScrollEdgeAppearance = appearance
}
3
0
250