I want to load my data on scroll down for my tableView.
I have a JSON API from where I get my data. Its a Private Message System. Everytime I will get 20 entries, I can select a page (0 to x) get the first to x entries (everytime 20 entries). So at the moment I have my table and I load a list of 20 entries and show them.
Now I want to have as soon as I reach the last entry it should load the next 20 entries.
I try to read many things about it here on StakcOVerflow and look at a Github Project with this but don't understand it at all. Can someone tell me how to do this?
You can use the willDisplayCell
method of UITableview. For ex, to see whether a row has 'load-more' button if you have one.
See this post.
A Github project.
you can implement this delegate
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ //put data on your array [tableView reloadData]; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With