本文转载至 http://blog.csdn.net/cerastes/article/details/39612177
- -(void)scrollViewDidScroll:(UIScrollView *)scrollView{
- CGPoint offset = scrollView.contentOffset; // 当前滚动位移
- CGRect bounds = scrollView.bounds; // UIScrollView 可视高度
- CGSize size = scrollView.contentSize; // 滚动区域
- UIEdgeInsets inset = scrollView.contentInset;
- float y = offset.y + bounds.size.height - inset.bottom;
- float h = size.height;
- float reload_distance = 10;
- if (y > (h + reload_distance)) {
- [self requestProductList];
- }
- }