How to know when a UIScrollView (includes UITableView, UICollectionView) finished scrolling

UIScrollViewDelegate has the method: -[UIScrollViewDelegate scrollViewDidEndDragging:willDecelerate:], and the decelerate parameter is NO when the scroll view has finished scrolling.

So you could use it like this:

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
    if (!decelerate){
        NSLog(@"The scroll view isn't scrolling anymore.");
        // perform some animation

Follow me on Twitter to keep up with what I’ve learned building my personal finance tool, Stash.

Subscribe to my mailing list to learn more about technology and business.

Your email will never be shared with anyone else.

Read more posts …
Written: October 19th, 2013
Categories: uiscrollview, uicollectionview, uikit, uitableview, ios