UINavigationBar Text Color in Swift

前端 未结 11 1651
刺人心
刺人心 2021-01-30 12:20

How would I go about changing the color of the UINavigationBar in Swift?

Most things online say to do something like:

[self.navigationContro         


        
11条回答
  •  盖世英雄少女心
    2021-01-30 13:16

    I use like:

        func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
          let navigationBarAppearace = UINavigationBar.appearance()
          navigationBarAppearace.titleTextAttributes = [NSForegroundColorAttributeName : UIColor.whiteColor()]
    
         return true
       }
    

提交回复
热议问题