The environment that I'm using is Xcode8 and iOS10 .
What did i do:
In IB , drag an
self.textField.layer.borderWidth = 1;
Same issue to me. I use UIAlertView contain UITextField, I fix it by setting textField.clearButtonMode = UITextFieldViewModeWhileEditing;That's ok.
Another method is : subclass UITextField, rewrite:
return CGRectInset(bounds, 2, 1);