I understand that this question has been asked many, many times on SO. However, as Apple does best, with the release of iOS 11, they seem to ha
I think you may be looking for this, right? But I've it in Swift :(
@IBOutlet weak var sbSearchBar: UISearchBar! if let textfield = sbSearchBar.value(forKey: "searchField") as? UITextField { textfield.textColor = UIColor.blue textfield.backgroundColor = UIColor.yellow }
Here is result: