I understand that this was answered, but I just wanted to give one more option:
CGRect frame = {{0, 0},{1, 1}}; [self.tableView scrollRectToVisible:frame animated:YES];
This always ensures that the UITableView will scroll up. Accepted answer:
NSIndexPath* top = [NSIndexPath indexPathForRow:NSNotFound inSection:0]; [self.tableView scrollToRowAtIndexPath:top atScrollPosition:UITableViewScrollPositionTop animated:YES];
didn't work for me because I was scrolling in the tableHeaderView, not the cell.
Using scrollRectToVisible works with iOS 6 and 7.
Chris Jun 18 '14 at 17:31 2014-06-18 17:31
source share