Detect if UIScrollView is scrolling

前端 未结 4 760
面向向阳花
面向向阳花 2021-02-01 07:21

I\'m looking to detect if (not when) a UIScrollView is scrolling.

i.e.

BOOL isScrolling = myscrollview.scrolling;

How woul

4条回答
  •  独厮守ぢ
    2021-02-01 07:24

    - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView;
    

    use a flag to save current scroll status? it could only solve the setContentOffset:animated: problem.

    The "scrolling" is just an effect, there are many ways that make a scrollview "scrolling", e.g. set the content offset continuously. So there should be NO answer for this question.

提交回复
热议问题