I've a dynamic UITableView that I created in Storyboard. This tableview has many cells containing a UITextField. When I click a Edit button, I want to enable the textfields and make the textfield in the first row of the tableview first responder. Meanwhile in edit mode more fields have to appear.
I'm able to show more fields and I'm able to show the keyboard to start editing the first row. Anyway, when the rows that I add are many, there is an issue: the keyboard appear but the table view scrolls a little bit down and I can't see the first tableview cell... that's annoying.
I tried many solution, but no one is working. For instance, I tried to use the scrollToRowAtIndexPath here:
- (void)textFieldDidBeginEditing:(UITextField *)textField {
NSIndexPath *indexPath =[NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
}