美文网首页iOS吧
判断tableView是上拉还是下滑

判断tableView是上拉还是下滑

作者: 酒深巷子Ya | 来源:发表于2018-01-13 11:25 被阅读1次

    使用scrollviewdid 方法有可能跟tableView发生冲突 使用拖拽 完美解决

    - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{
        CGPoint translation = [scrollView.panGestureRecognizer translationInView:scrollView.superview];
        if (translation.y>0) {//下滑
          
        }else if(translation.y<0){//上滑
    
        }
    }
    ```

    相关文章

      网友评论

        本文标题:判断tableView是上拉还是下滑

        本文链接:https://www.haomeiwen.com/subject/knhcoxtx.html