ビューが下にスクロールするとき、つまりプルアップして更新するときに、より多くのデータを読み込みたいのですが、以下に示すように「さらに読み込み中...」のような単語を表示し、そのセルでテーブルビューを停止する方法がわかりません。
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:10 inSection:0];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
エラーがあります:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '-[TNTableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (10) beyond bounds (0) for section (0).'
tableView のデータがない場合、さらに読み込むセルは一番下のセルにあります。たとえば、テーブルは 9 行を表示できます。tableview のデータがない場合、「さらに読み込む」セルは 10 行目です。