Slide 19
Slide 19 text
Change searchBar's backGroundColor
• swift - UISearchController iOS 11 Customization - Stack
Overflow
if let textField = searchBar.value(forKey: "searchField") as? UITextField {
textField.textColor = UIColor.blue
if let backgroundView = textField.subviews.first {
// Background color
backgroundView.backgroundColor = UIColor.white
// Rounded corner
backgroundview.layer.cornerRadius = 10;
backgroundview.clipsToBounds = true;
}
}