I am trying to check when a text field changes, equivalent too the function used for textView - textViewDidChange
so far I have done this:
fu
Swift 4
textField.addTarget(self, action: #selector(textIsChanging), for: UIControlEvents.editingChanged)
@objc func textIsChanging(_ textField:UITextField) {
print ("TextField is changing")
}
If you want to make a change once the user has typed in completely (It will be called once user dismiss keyboard or press enter).
textField.addTarget(self, action: #selector(textDidChange), for: UIControlEvents.editingDidEnd)
@objc func textDidChange(_ textField:UITextField) {
print ("TextField did changed")
}