I want to load more data when view scroll to bottom,i.e. pull up to refresh, but I don't know how to display words like "Loading More..." as showing below and stop the tableview at that cell, because if use
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:10 inSection:0];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
there's an error:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '-[TNTableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (10) beyond bounds (0) for section (0).'
and if there's no data for tableView, loading more is still at the bottom cell, e.g. a table can show 9 rows, if there's no data for tableview, the "Loading More" cell is at the 10th row.