如何在tableview底部显示pull up to refresh control? [英] how to show pull up to refresh control in the bottom of tableview?
本文介绍了如何在tableview底部显示pull up to refresh control?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在tableView中,当我从顶部向下拉时,它正在获取数据。但是,如果我想从tableView的底部提取数据,我该如何实现,请建议我
In the tableView , when I am pulling down from the top, it is fetching the data. But if I want pulling up the data from the bottom in tableView, how can I implement, please suggest me
推荐答案
我太过坚持了在这样的情况下,我终于找到了一些答案,如底部的UIRefreshControl UITableView iOS6的内容?并在footerview中实现了我们的 UIActivityIndicatorView
。因此它工作正常。
I too stucked with such a situation and at last i found some answers like UIRefreshControl at the bottom of the UITableView iOS6? and thus implemeted our UIActivityIndicatorView
in footerview. Thus it is working fine Now.
// call this method in `viewDidLoad` and connect the tableview delegates.
-(void)initializeRefreshControl
{
indicatorFooter = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableVeiwMarkets.frame), 44)];
[indicatorFooter setColor:[UIColor blackColor]];
[indicatorFooter startAnimating];
[self.tableVeiwMarkets setTableFooterView:indicatorFooter];
}
-(void)refreshTableVeiwList
{
// your refresh code goes here
}
-(void)scrollViewDidScroll: (UIScrollView*)scrollView
{
if (scrollView.contentOffset.y + scrollView.frame.size.height == scrollView.contentSize.height)
{
[self refreshTableVeiwList];
}
}
这篇关于如何在tableview底部显示pull up to refresh control?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文