I’m writing a function that formats the entries on a UITextField to a date. It must be displayed like this dd/mm/yyyy. The problem is that I’m not being able to detect the delete key was pressed. I’m using UITextFieldDelegate method textField:shouldChangeCharactersInRange:replacementString: to detect when the user presses a key. Is there something like a \n I may look for on the replacementString?
I’m writing a function that formats the entries on a UITextField to a date.
Share
The replacement string should be the empty string (
@"") when a character is about to be deleted.