Incorrect color used for navigation button

I run into an issue when tint colour is set for UIView, change of tint colour for navigation bar will not apply.


UIView.appearance().tintColor = UIColor.red

UINavigationBar.appearance().tintColor = UIColor.white


Result colour of back button will be red thus not visible to a user.

This code was working for iOS 10 built from Xcode 8.3.3 but not working on iOS 11 built from Xcode 9 beta 5.


Did anyone observe the same behaviour?

Same here. I have been using this code to change the tint color of element in the navigation bar:

UINavigationBar.appearance().tintColor = theme.labelColor

However, this is no longer working in iOS 11. Before iOS 11, buttons in the Navigation Bar were

UINavigationButton
s, but in iOS 11 they've been changed to
_UIModernBarButton
. I was able to change their tint color with
UIButton.appearance().tintcolor
, but that changes every button's.

(https://stackoverflow.com/questions/45893605/changing-the-tint-colour-of-elements-in-uinavigationbar-ios-11)

Incorrect color used for navigation button
 
 
Q