If you create and disable (e.g. @IBOutlet var barButton: UIBarButtonItem!
) UIBarButtonItem
with your UIBarButtonItem
, you can change your font type using setTitleTextAttributes
in the output.
barButton.setTitleTextAttributes([ NSFontAttributeName: UIFont(name: "Arial", size: 12)!], forState: UIControlState.Normal)
Swift3
barButton.setTitleTextAttributes([ NSFontAttributeName: UIFont(name: "Arial", size: 12)!], for: UIControlState.normal)
source share