Change global UIBarButtonItem appearance

Call setTitleTextAttributes on the UIBarButtonItem appearance proxy:

Swift 3:

UIBarButtonItem.appearance().setTitleTextAttributes([key : value], for: .normal)

Swift 2.x:

UIBarButtonItem.appearance().setTitleTextAttributes([key : value], forState: UIControlState.Normal)

Did you tried realising it with UIAppearance protocol? It should be used for global —Āustomizing some visual classes. I can suggest your some code like this:

UIBarButtonItem.appearanceWhenContainedInInstancesOfClasses([UINavigationBar.classForCoder()]).setTitleTextAttributes(["attribute" : "value"], forState: .Normal)

Hopes it is clear from the code the way in works and how you can enwide it.