开发者

How can we implement Facebook app like "pull to reload" option?

开发者 https://www.devze.com 2023-03-10 02:36 出处:网络
How can we implement FACEBOOK APP like \"pull to reload\" option for loading more data in tableView .(F开发者_开发问答ACEBOOK use this option in Wall Posts ). If you have ever used facebook app u alre

How can we implement FACEBOOK APP like "pull to reload" option for loading more data in tableView .(F开发者_开发问答ACEBOOK use this option in Wall Posts ). If you have ever used facebook app u already notice that way of loading more data.

Can any one help me to solve this puzzle.

Thanks in advance.


If you don't want to use the whole three20 library, you can just use the EGORefreshTable Header View, which does exactly what you ask.

https://github.com/enormego/EGOTableViewPullRefresh


Facebook app use three20 library which handle the more button that you ask.

Try this library. It's very good and easy.


You can achieve such behavior by implementing scrollViewDidScroll: method of scroll view delegate. Check contentOffset.y property & if its value is less than, for instance, -30, start update.

tableWithInfo.delegate = myContoller;

...

- (void)scrollViewDidScroll:(UIScrollView *)aScrollView {
    if (aScrollView.contentOffset.y < -30) { [self startUpdate]; }
}
0

精彩评论

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