3
votes

I have a custom button on my navigation bar and I had change the tint color of my navigation bar with UINavigationBar.appearance().tintColor = UIColor.whiteColor()

enter image description here

When this button make the action, all navigation bar returns to blue color

enter image description here

How I can fix it?

1
what type is your button ?nsinvocation
A custom button with let shareButton: UIBarButtonItem = UIBarButtonItem(image: UIImage(named: "Button"), style: UIBarButtonItemStyle.Plain, target: self, action: "Function")Cesar Rioja G
do you perform any UI changes in "Function" method ?nsinvocation
No, "Function" presents a ViewCesar Rioja G

1 Answers

0
votes

Please make navigation bar as attributed as follows

Swift3.0 Code:

self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.white]