I'm trying to globally change the UITextField color to white when my application loads.
I call my Theme manager like:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let theme = ThemeManager.currentTheme()
ThemeManager.applyTheme(theme: theme)
return true
}
Then in my theme manager, I set the border color like:
UITextField.appearance().layer.borderWidth = 5.0
UITextField.appearance().layer.borderColor = UIColor.white.cgColor
UITextField.appearance().textColor = UIColor.white
It seems like every other UI elment takes the changes fine, but this doesn't persist throughout the application. If I manually set the color on specific TextFields it works fine, but was trying to avoid that, am I doing something wrong?
Thanks.