我想要无限滚动,所以我想我会尝试这段代码,但每当我滚动时我都会崩溃:
代码:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView.contentSize.height - scrollView.contentOffset.y < (self.view.bounds.size.height)) {
if (![self isLoading]) {
[self loadNextPage];
}
else{
}
}
}
崩溃错误:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to delete row 0 from section 1, but there are only 1 sections before the update'