I have a UITableView
that has something like 30 cells in it. I successfully use the scroll to index method when I add a new cell, but it is not working (almost) when called at view did load. When it is called at view didload it scrolls to the second to last cell instead of the last one, leaving the last one still hidden beyond view. There is definitely an object in the last position of the array at the point i am calling the scroll to, it is just weird.
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[myMatch.chat count]-1 inSection:0];
[tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];