I'm a big stuck with UITextFields at the moment.I'm trying to implement a custom appearance for the Text Fields in my app, however they don't seem to work as intended. As an example, I put three text fields on a viewcontroller, each using my CustomTextField class. There is additional logic in my original files to change other aspects of the appearance, but that'll do it:let bgColor = UIColor.darkGrayColor() let focusedBgColor = UIColor.whiteColor() class CustomTextField: UITextField { override func awakeFromNib() { super.awakeFromNib() self.backgroundColor = bgColor } override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator) { coordinator.addCoordinatedAnimations({ if self.focused { self.backgroundColor = focusedBgColor self.transform = CGAffineTransformMakeScale(1.1, 1.1) } else { self.backgroundColor = bgColor self.transform = CGAffineTransformIdentity } }, completion: nil) } }Everything seems to work fine when just switc
4
0
3.8k