我要加载更多数据时,视图滚动至底部,即拉起刷新,但我不知道该怎么如下说明显示,如“加载更多...”字样,并在该小区停止的tableview,因为如果使用
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行。