I have a couple of navigation items (Back Button, Save Button) on my NavigationBar. I tried looking for relevant answers, I find either an outdated answer or just none.
I tried setTitleTextAttributes on the navigationItem.leftBarButtonItem but did not work.
I managed to change the font of the NavigationBar title but that's it. Using self.navigationBar.titleTextAttribues, same method done with the nav items but not working.
EDIT: Found a solution, but I have to add this on EVERY view controller's viewWillAppear
let barBtn = UIBarButtonItem(title: "Test", style: UIBarButtonItemStyle.Bordered, target: self, action: "backButtonPressed")
barBtn.setTitleTextAttributes([NSFontAttributeName: UIFont(name: FONT_HERE, size: 12)!], forState: UIControlState.Normal)
self.navigationItem.setHidesBackButton(true, animated: false)
self.navigationItem.setLeftBarButtonItem(barBtn, animated: false)
Then adding the backButtonPressed function where I call a popViewControllerAnimated.
What do you think, guys? Is there a simpler solution?