[英]How to change color of Navigation controller back button?
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)
inside viewDidLoad
of LoginController()
please assign respective tintColor
to the UIBarButtonItem在
LoginController()
的viewDidLoad
中,请将各自的tintColor
分配给 UIBarButtonItem
let leftBarButtonItem = UIBarButtonItem(xxx)
leftBarButtonItem.tintColor = #UIColor
navigationItem.leftBarButtonItem = leftBarButtonItem
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.