开发者

UITableView - Automatic Load Next 25... when nearing bottom

开发者 https://www.devze.com 2023-02-01 15:42 出处:网络
Instead of the normal tap \"Load Next 25...\" at the bottom of a UITableView, I want the same loadNext: method to be called automatically as the user scrolls near to the bottom, so when the bottom is

Instead of the normal tap "Load Next 25..." at the bottom of a UITableView, I want the same loadNext: method to be called automatically as the user scrolls near to the bottom, so when the bottom is actua开发者_StackOverflow社区lly reached, the results will either already be there or a ActivitySpinner holding their place.

Does anybody know of an example that does this? I'd like to keep the behaviour consistent with any other apps that use a similar feature (similar to the "Pull down to refresh" behaviour we are seeing in many apps now).

Thanks


What I did in my app Think Messenger is add an extra row at the bottom of the table with an activity indicator. In my data source, whenever that cell is requested, I start downloading the next page of data.


Here's a post that goes step-by-step on how to do the 'pull to refresh' scheme. You can certainly repurpose it do it for the footer.

How to make a Pull-To-Reload TableView

0

精彩评论

暂无评论...
验证码 换一张
取 消