- (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
时间: 2024-11-07 09:28:04