
I want to load more data when the scroll scroll down, i.e. pull up to refresh, but I donβt know how to display words such as "Loading More ..." as shown below, and stop displaying the table in this cell, because if you use
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:10 inSection:0]; [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
there is an error:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '-[TNTableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (10) beyond bounds (0) for section (0).'
and if there is no data for the tableView, the load is still in the bottom cell, for example. the table can display 9 rows, if there is no data to view the table, the "Load more" cell is in the 10th row.
source share