Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force UICollectionView to stop scrolling

A user performs a quick swipe gesture to make a UICollectionView start scrolling (it will gradually come to an halt).

How can I programmatically force the scrolling to come to an immediate stop? To clarify, I want to allow the deceleration but I need to be able to stop it in code.

like image 531
Pétur Ingi Egilsson Avatar asked May 13 '14 20:05

Pétur Ingi Egilsson


1 Answers

Try this one. Worked for me. :)

self.collectionView.scrollEnabled = NO;
like image 104
haifacarina Avatar answered Oct 20 '22 13:10

haifacarina