declare a global variable pagingCount and initialize it with 1 in viewdidload.
make this change in your data fetcher method.
NSURL *theURL = [NSURL URLWithString:@"http://qa.networc.in:1336/api/dispatcher/rideScheduled/:%d",pagingCount];
now you will pass this paging count & call your data fetcher method whenever the last cell is about to display.
update the paging count with +1
- (void)tableView:(UITableView *)tableView willDisplayCell: (UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == [getid count] - 1 ) {
//call your method of fetching data with paging which will be increased with 1
//increase the pagingCount
pagingCount += 1;
//call your data fetcher
}
}