У меня есть табличное представление в моем приложении, в которое я загружаю различные типы ячеек. Это прекрасно и хорошо работает. Но теперь мне нужно сделать разбивку на страницы. Мне нужно передать номер страницы в службу один, два и т.д. И загрузить ее, когда заканчивается первая страница. Для первого я загружаю счет 5, после этого, когда заканчивается прокрутка, мне нужно загрузить следующий. Я новичок в этой разбивке на страницы. Может ли кто-нибудь дать мне направление следовать? Я так пробовал, но он станет бесконечным циклом `
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *) cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
int count1 = [array count];
NSLog(@"%d",count1);
NSLog(@"%d",indexPath.section);
NSLog(@"%d",max);
NSLog(@"%d",min);
if(indexPath.section == count1 - 1) // If going to display last row available in your source
{
NSLog(@"%d",max);
NSLog(@"%d",min);
if(min <= max)
{
[self getmessages:min];
}
else
{
self.mtableview.tableFooterView = nil; //You can add an activity indicator in tableview footer in viewDidLoad to show a loading status to user.
}
}
}
`