How do I change the color of a UINavigationBar in Swift?
Most internet applications say to do something like:
[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
What I translated into
let titleDict: NSDictionary = ["NSForegroundColorAttributeName": UIColor.whiteColor()] self.navigationController.navigationBartitleTextAttributes = titleDict
But that will not work. I already changed the background color and buttons, but the color of the text does not change. Any ideas?
text colors swift navigation uinavigationbar
cclloyd Jun 25 '14 at 6:50 2014-06-25 06:50
source share