监测uitableview 向上滑动和向下滑动的事件

- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    CGFloat height = _varietyTableView.frame.size.height;
    CGFloat distanceFromButton = _varietyTableView.contentSize.height - _varietyTableView.contentOffset.y;
    if (distanceFromButton == height)
    {
        NSLog(@"=====滑动到底了");
    }
    
    if (_varietyTableView.contentOffset.y == 0)
    {
        NSLog(@"=====滑动到顶了");
    }
}

 

转:http://www.360doc.com/content/14/0508/15/11029609_375812938.shtml

原文地址:https://www.cnblogs.com/ygm900/p/3998330.html