I'm using a UICollectionView
to scroll through a set of thumbnails quickly. Once scrolling ends, I'd like to display a larger hi-res version of the current thumbnail.
How can I detect when the user has completed scrolling? I do implement didEndDisplayingCell
, but that only tells me when a particular cell has scrolled off; it doesn't tell me when the scroll motion actually completes.
Best Answer
UICollectionView
is a subclass ofUIScrollView
. So if you have set the delegate and implementedUIScrollViewDelegate
, you should be able to detect this the same way asUIScrollView
.For eg:-
As per documentation, the above method should tell when the scroll view has ended decelerating the scrolling movement.