I want to setup UIBarButtonItem
so that it uses a different font throughout my app. I'm doing this using appearance
, however I have hit an issue with how to display the font in bold when its selected. Here is what I want to do:
var barButtonItemApperance = UIBarButtonItem.appearance()
barButtonItemApperance.setTitleTextAttributes([NSFontAttributeName : UIFont(name: "Apple SD Gothic Neo", size: 16)!], forState: UIControlState.Normal)
barButtonItemApperance.setTitleTextAttributes([NSFontAttributeName : UIFont(name: "Apple SD Gothic Neo", size: 16)!], forState: UIControlState.Selected) // I want this to be in bold text
Does anyone know how I can achieve this? The font is definitely 100% available in bold.
for making text bold, this is the general syntax:
But you can simply choose the bold version of the font Apple SD Gothic Neo, Below is the list: