CGPoint point = [scrollView.panGestureRecognizer translationInView:self.view];
if (point.y > 0) {
//向下滚动
} else {
//向上滚动
}
if (self.lastContentOffset > scrollView.contentOffset.y) {
//向下滚动
} else {
//向上滚动
}
self.lastContentOffset = scrollView.contentOffset.y;
}
网友评论