I do validation of UITextField in textfieldShouldEndEditing
delegate method, so every time I change the UITextfield being edited the method is called and the validation is performed.
The return button of the keyboard is configured as Done button. When it is pressed I process the input, but the textfieldShouldEndEditing
of the last edited UItextField is never called before, so it is not validated.
This seems strange to me since the normal behavior is the user just hitting done button after entering the last character in the field, but this does not trigger the textFieldShouldEndEditing
method.
To take on this I have to force validation again in the textfieldShouldReturn
method.
Maybe I'm missing some point since I can't find the logic in this.