如何使用RSS为博客应用程序实现无限滚动?

时间:2013-07-17 11:59:16

标签: ios rss

我想知道是否可以为显示我博客RSS源的应用程序实现无限滚动?有点像Instagram或Facebook,当你滚动到底部它会获取更多的feed。可以使用RSS提要为应用程序完成相同的操作吗?

3 个答案:

答案 0 :(得分:1)

实现此UITableView Delegate方法:

 - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath

使用行的indexPath检查数据源数组计数。 然后使用自定义方法

向阵列中添加更多数据

答案 1 :(得分:0)

是的,这是可能的 - 你可能需要自己实现这个逻辑。看看这篇文章:

http://michele.berto.li/infinite-scroll-on-ios-with-uitableview/

答案 2 :(得分:0)

请看这个组件:https://github.com/samvermette/SVPullToRefresh。有一个包含方法的类别:

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

您可以查看示例,它为您提供了一种实现它的好方法。