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