titleTextAttributes UIAppearance font in iOS 7

前端 未结 7 1505
醉酒成梦
醉酒成梦 2020-12-08 09:47

I am using UIAppearance to apply fonts to UINavigationBar and UIBarButtonItem and I am having problems. I ran this code:

[[UIBarButtonItem appearanceWhenCont         


        
相关标签:
7条回答
  • 2020-12-08 10:51

    Here is how to globally change the nav bar title's text color in Swift 4:

    UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor.rawValue: UIColor.yellow]
    
    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题