I created a custom text field, a class that extends a UITextField, how can I know if that UITextField has a value, I already tried the shouldChangeCharactersIn but nothing happened.
This is my code for my custom UITextField Class
@IBDesignable class CustomTextField: UITextField {
override init(frame: CGRect) {
super.init(frame: frame)
loadContent()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
loadContent()
}
...
}
I want to print "the textfield is blank" if the UITextField is blank or if the user removed the value in it, and "the textfield has content" if there's a value in it or if the user add a value in it.