UITextField shouldChangeCharactersInRange doesn't detect first character
问题 I have a UITextField and I am trying to format it as phone number, however I am struggling getting the first letter of the UITextField for some reason. func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool { if textField == myTextField { var updatedTextString : NSString = PartialFormatter().formatPartial(textField.text!) self.formattedPhoneNumber(updatedTextString, textField: textField) } return true } func