我在UICollectionView上使用了UIRefreshControl。我用它来为UICollectionView加载更多数据。但是,刷新不是由UICollectionView的高度运行的。
请帮帮我。
答案 0 :(得分:1)
此实例,您不需要使用@selector。您可以使用UIScrollView的委托。覆盖函数 - (void)scrollViewDidScroll:(UIScrollView *)scrollView
这是我的代码:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
if (scrollView.contentOffset.y < -65 && ![refreshControl isRefreshing]) {
[refreshControl beginRefreshing];
//do all the work
[refreshControl endRefreshing];
}
}