I want to make my bar button item text in a toolbar (or Nav bar) bold. I know how to change the font color manually with an NSAttributedString like below:
button.setTitleTextAttributes([NSAttributedStringKey.foregroundColor: UIColor(red: 242/255, green: 133/255, blue: 94/255, alpha: 1.0)], for: .normal)
I also know how to change bold on something else like a tableview cell with UIFont.boldSystemFont(ofSize: 12)
, but this can't be used with the above.
Is there a simple way to set a UIBarButtonItem bold?
*Edit: other similar answered questions show just changing the font type to Helvetica-Bold using NSFontAttributeName: UIFont(name: "Helvetica-Bold", size: 12.0)
, but is there a way to have the actual system font bolded, or is Helvetica-Bold the exact equivalent of the system font bolded?