-(BOOL)textFieldShouldReturn:(UITextField*)textField;
{
NSInteger nextTag = textField.tag + 1;
// Try to find next responder
UIResponder* nextResponder = [textField.superview viewWithTag:nextTag];
if (nextResponder) {
// Found next responder, so set it.
[nextResponder becomeFirstResponder];
} else {
// Not found, so remove keyboard.
[textField resignFirstResponder];
}
return NO; // We do not want UITextField to insert line-breaks.
}
...............................................OR.............................
-(BOOL) textFieldShouldReturn: (UITextField *) theTextField {
int tag = theTextField.tag + 1;
[[self.view viewWithTag:tag] becomeFirstResponder];
return NO;
}
...............................NOTE....................
1-Don't forgot textField connect delegate to File Owner and to give respective tag value of textfield
for ex..1,2,3,4,5,6...
No comments:
Post a Comment