How to know exactly when a UIScrollView's scrolling has stopped?

后端 未结 6 1025
慢半拍i
慢半拍i 2020-12-04 22:07

In short, I need to know exactly when the scrollview stopped scrolling. By \'stopped scrolling\', I mean the moment at which it is no longer moving and not being touched.

6条回答
  •  自闭症患者
    2020-12-04 22:33

    I answered this question on my blog which outlines how to do it without problems.

    It involves 'intercepting the delegate' to do a few things, then to pass the delegate messages to where they were intended. This is required because there are a few scenarios where the delegate fires if it moved programmatically, or not, or both, and so anyway, best to just look at this link below:

    How to know when a UIScrollView is scrolling

    It's a little tricky, but I've put up a recipe there and have explained the parts in detail.

提交回复
热议问题