In order to move the cursor automatically to the next data entry field when the user presses Next on the keyboard you need to resignFirstResponder from the current field and assign it to the next field using becomeFirstResponder
- (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;
}
You need to set the Return Key types accordingly within the interface builder. Your ViewController must also implement UITextFieldDelegate and the textfields delegate assignment must be set via IB to the File’s Owner
Thank you!
Thanks! Simple and clear
thanky also from my side