I just asked a question about how to monitor changes to a UITextField and received this response :
UITextField
- (BOOL)textField:(UITextField *)textField should
Swift Version
In Swift We need to cast textField's text to NSString. The following can be useful:
textField's
NSString
let newString = (textField.text! as NSString).replacingCharacters(in: range, with: string)