Reputation: 8904
I'm facing a wired issue related to navigation bar color. Please check below images.
Image 1
Image 2
Image 1 is a home view controller and image 2 is a second view controller that I'm pushing on home view controller.
In AppDelegate.swift
I have set following...
UINavigationBar.appearance().backgroundColor = UIColor.clear
UINavigationBar.appearance().tintColor = UIColor.white
UINavigationBar.appearance().barTintColor = Color.red
UINavigationBar.appearance().shadowImage = UIImage();
UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.white]
Please watch till end the below image you will get an idea about issue. I've reduced animation speed so you can get an idea about it.
Please help me out this issue. Any help will be appreciated !!
Thank you in advance.
Upvotes: 1
Views: 1122
Reputation: 3157
Uncheck the translucent property of UINavigationBar as below-
OR
self.navigationController?.navigationBar.isTranslucent = false
Upvotes: 3