2019-04-12-19-ChangeBarButtonFont

let barButton = UIBarButtonItem(title: "Text", style: .plain, target: nil, action: nil)
barButton.setTitleTextAttributes(
  [.font : UIFont.systemFont(ofSize: 20)],
  for: .normal)
barButton.setTitleTextAttributes(
  [.font : UIFont.systemFont(ofSize: 20)],
  for: .highlighted)

Last updated

Was this helpful?