I’m using a method
-(BOOL)textFieldShouldReturn:(UITextField*)textField;
{
NSInteger nextTag = textField.tag + 1;
UIResponder* nextResponder = [textField.superview viewWithTag:nextTag];
if (nextResponder) {
[nextResponder becomeFirstResponder];
} else {
[textField resignFirstResponder];
}
return NO;
}
Which allows users to jump between text fields on a login page using the “next” button on the keyboard (based on tags). However, my last UITextfield is not triggering the “did end on exit” event because it is already hooked up to a delegate of file’s owner. I can get it to trigger the “did end on exit” event if I remove the file’s owner delegate, but in that case I can’t jump to the last text field using the “next” button on the keyboard. Is there a workaround for this?
Instead of writing this code in textFieldShouldReturn, you can write this code in your own method and call this method on next button click.