我有一个每个单元格都包含PFObject的UICollectionView。由于每个UICollectionView可能有数百个这样的对象,我不想一次查询所有对象,而是只调用有限的数量,然后随着用户滚动到最后自动调用更多对象(有点像许多web应用程序使用的无休止滚动)。
PFQuery是否支持这些类型的呼叫?如果支持,我如何能够连续和自动呼叫?
谢谢!
发布于 2014-04-08 02:53:00
也许像这样的东西可以让你走上正轨:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
float scrollViewHeight = scrollView.frame.size.height;
float scrollContentSizeHeight = scrollView.contentSize.height;
else if (scrollView.contentOffset.y <= 0) {
// then we are at the top
}
else if (scrollView.contentOffset.y + scrollViewHeight >= scrollContentSizeHeight) {
// then we are at the bottom - query new results
}
}我不认为你必须添加任何东西来调用它,只要你的控制器已经是你集合视图的委托。
https://stackoverflow.com/questions/22920292
复制相似问题