iOS 判断 滚动视图上滑还是下滑

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
     CGPoint point = [scrollView.panGestureRecognizer translationInView:scrollView];
        CGFloat offsetY = point.y;
        if (offsetY < 0) {
            /// 上滑
            
        } else {
            /// 下滑
           
        }
}

你可能感兴趣的:(iOS 判断 滚动视图上滑还是下滑)