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
This code changes the background color of the text field.
Swift 4
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
//background color of text field
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).backgroundColor = .cyan
}
This is the result