Home > Net >  How to change color of Navigation controller back button?
How to change color of Navigation controller back button?

Time:06-22

enter image description here

How can i change this button's color and its title programatically?

This is how i push my controller:

let controller = LoginController()
navigationController?.pushViewController(controller, animated: true)

CodePudding user response:

inside viewDidLoad of LoginController() please assign respective tintColor to the UIBarButtonItem

let leftBarButtonItem = UIBarButtonItem(xxx)
leftBarButtonItem.tintColor = #UIColor
navigationItem.leftBarButtonItem = leftBarButtonItem
  • Related