Changing the Tint Color of UIBarButtonItem

后端 未结 8 1879
暗喜
暗喜 2020-12-15 03:31

I have a project using Storyboards and whenever I push a view controller with a segue, the dynamically created bar button item is always blue.

8条回答
  •  北海茫月
    2020-12-15 03:33

    This worked for me

    AddBarButtonItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor : UIColor.white], for: .normal)
    

提交回复
热议问题