UISearchbar add navigationController?.navigationBar. How to change "Cancel" color
_searchBar = UISearchBar(frame: CGRect(frame: CGRect(x: 0, y: 0, width: 414, height: 64)))
_searchBar!.delegate = self
_searchBar!.showsCancelButton = true
backgroundColor = .white
barTintColor = .white
tintColor = .red
backgroundImage = UIImage()
_searchBar!.placeholder = "搜索文件"
navigationController?.navigationBar.addSubview(_searchBar!)
This result is "Cancel" color is white. How do I set it to red?