I am using this other SO answer for adding UITextFields to my UITableViewCells. However, I am now at a loss how I can let the user focus on the nex
This worked well for me, would have to be tweaked to fit your needs though:
#pragma mark - UITextField Delegate
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
HRCFormCell * currentCell = (HRCFormCell *) textField.superview.superview;
NSIndexPath * currentIndexPath = [self.tableview indexPathForCell:currentCell];
if (currentIndexPath.row != [self.questionsArray count] - 1) {
NSIndexPath * nextIndexPath = [NSIndexPath indexPathForRow:currentIndexPath.row + 1 inSection:0];
HRCFormCell * nextCell = (HRCFormCell *) [self.tableview cellForRowAtIndexPath:nextIndexPath];
[self.tableview scrollToRowAtIndexPath:nextIndexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
[nextCell.textField becomeFirstResponder];
}
return YES;
}