自動(dòng)載入更新數(shù)據(jù)對(duì)用戶來說也很友好,這減少了用戶等待下載的時(shí)間。例如每次載入50條信息,那就可以在滾動(dòng)到倒數(shù)第10條以內(nèi)時(shí),加載更多信息:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if (count - indexPath.row < 10 && !updating) {
updating = YES;
[self update];
}
}