How can I change the font of the back button for my navigation bar?

后端 未结 6 1361
隐瞒了意图╮
隐瞒了意图╮ 2020-11-29 03:02

How can I change the font of the back button for my navigation bar.

The back button is either \"back\" or the title from the previous view controller.

I tho

6条回答
  •  渐次进展
    2020-11-29 03:22

    SWIFT 3

        UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: UIFont(name: "Open Sans", size: 15)!,NSForegroundColorAttributeName: UIColor.white]
        UIBarButtonItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont(name: "Open Sans", size: 15)!], for: UIControlState.normal)
    

提交回复
热议问题