How to change color of back button on NavigationView

后端 未结 6 1732
情书的邮戳
情书的邮戳 2021-01-02 04:56

When you click on the button it takes you to a new view and puts a back button in the top left. I can\'t figure out what property controls the color of the back button. I tr

6条回答
  •  没有蜡笔的小新
    2021-01-02 05:21

    This worked for me:

    let navBarAppearance = UINavigationBarAppearance()
    navBarAppearance.backButtonAppearance.normal.titleTextAttributes = [.foregroundColor: UIColor.white]
    

提交回复
热议问题