Change color of Back button in navigation bar

后端 未结 26 1920
孤街浪徒
孤街浪徒 2020-12-02 05:58

I am trying to change the color of the Settings button to white, but can\'t get it to change.

I\'ve tried both of these:

navigationItem.leftBarButton         


        
相关标签:
26条回答
  • 2020-12-02 06:27

    Use this code in AppDelegate class, inside of didFinishLaunchingWithOptions.

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    
    UINavigationBar.appearance().tintColor = .white
    
    }
    
    0 讨论(0)
  • 2020-12-02 06:28

    Very easy to set up in the storyboard:

    0 讨论(0)
提交回复
热议问题