I have three text fields, and I want to be able to move the cursor to the next. When the latter is reached, the keyboard is rejected. But nothing works for me ... Here is an example of what I have. However, nothing happens and nothing happens when I select the next button.
- (BOOL)textFieldShouldReturn:(UITextField *)textField { if (textField == field1TextField) { [textField resignFirstResponder]; [field2TextField becomeFirstResponder]; } else if (textField == field2TextField) { [textField resignFirstResponder]; [field3TextField becomeFirstResponder]; } else if (textField == field3TextField) { [textField resignFirstResponder]; } return YES; }
Kyle greenlaw
source share