如何检查用户是否向下滚动75%?我想实现一个回发来加载更多的数据,但我不知道如何实现这个...如果有人能指出我正确的方向或展示一些示例代码,我将不胜感激?
答案 0 :(得分:1)
First you need to set your scrollview delegate. And on scrollViewDidScroll method you need to calculate scroll position. This should cover your goals
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
if ((scrollView.contentOffset.y + scrollView.bounds.size.height)/scrollView.contentSize.height) > 0.75) {
// do stuff
}
}