/** 点击标题按钮后视图停止滚动会调用此方法 */

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

 }

 

如果我们在一个按钮的事件中调用了如下方法

[self.scrollView setContentOffset:offSet animated:YES];

点击按钮后,视图停止滚动时就会调用前面提到的方法。DidEndScrolling

官方注释中说明

called when setContentOffset/scrollRectVisible:animated: finishes. not called if not animating

说明只有在调用了以上红色部分的两个方法时才会触发DidEndScrolling方法。例子中我们调用了第一个方法。

 **************************************************************

/** 手指滑动屏幕时,视图停止滚动会调用此方法 */

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{

}

当我们手指在scrollView中进行滑动时,系统会给出一个decelerationRate减速值。当该值为0时,

视图将停止滚动,则调用DidEndDecelerating方法