I\'m trying to set the font of the UIBarButtonItem like so:
UIBarButtonItem
let barButton = UIBarButtonItem.appearance() barButton.setTitleTextAttributes([NSFon
With Swift 4
NSFontAttributeName is deprecated, you can use NSAttributedStringKey values to set attributes.
if let fontStyle = UIFont(name: "HelveticaNeue-Light", size: 19) { navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.font: fontStyle]
}