In my app, I have given navigation bar back button colour as red. Both arrow and text works finely with iPhone in all screens. But in iPad it works correctly only for home screen. When I enter inside any of the other view controllers, my navigation back text is in red colour but back button arrow becomes grey colour. Here is my code,
func setup() {
self.navigationBar.barTintColor = UIColor.blue()
UINavigationBar.appearance().titleTextAttributes = [
NSForegroundColorAttributeName : UIColor.white,
NSFontAttributeName : UIFont(name: "Arial", size: CGFloat(22.0))!
]
self.navigationBar.isTranslucent = true
UINavigationBar.appearance().tintColor = UIColor.red
// self.navigationBar.tintColor = UIColor(red: CGFloat(132.0 / 255.0), green: CGFloat(204.0 / 255.0), blue: CGFloat(90.0 / 255.0), alpha: CGFloat(1.0))
// Draw a bottom border
let bottomBorderHeight = 3 / UIScreen.main.scale
let bottomBorder = UIView(frame: CGRect(x: CGFloat(0), y: CGFloat(self.navigationBar.frame.size.height-bottomBorderHeight), width: CGFloat(self.view.bounds.width), height: CGFloat(bottomBorderHeight)))
bottomBorder.backgroundColor = UIColor(red: CGFloat(0 / 255.0), green: CGFloat(97 / 255.0), blue: CGFloat(56 / 255.0), alpha: CGFloat(1.0))
self.navigationBar.addSubview(bottomBorder)
}
Tried barTintcolor, appearance, bar style etc..but nothing works. Any idea? TIA.
tintAdjustmentMode
helps? – Puttin