【问题标题】:Put refresh control of table at the bottom将表格的刷新控制放在底部
【发布时间】:2016-02-20 08:40:16
【问题描述】:

我要实现一个UITableView,通过拉到表格底部来显示旧项目,如何在当前列表底部显示刷新图标UIActivityIndicator

非常感谢!

【问题讨论】:

    标签: ios uitableview uirefreshcontrol


    【解决方案1】:

    你可以使用开源库SVPullToRefresh,它有一个简单的使用方法:

    [tableView addInfiniteScrollingWithActionHandler:^{
        // append data to data source, insert new cells at the end of table view
        // call [tableView.infiniteScrollingView stopAnimating] when done
    }];
    

    当调用actionHandler 块时,输入您的代码以获取旧内容。

    【讨论】:

    • 意思是没有组件就不能像instagram那样行事?
    • 好的,我明白了,你想要无限滚动,它会触发一个事件来加载旧内容。我已经更新了我的答案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-30
    • 1970-01-01
    • 2015-05-02
    • 2021-09-08
    • 1970-01-01
    • 1970-01-01
    • 2015-09-10
    相关资源
    最近更新 更多