Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force UICollectionView with fewer items to scroll?

I am working with a UICollectionView that displays fewer items than necessary to fill the whole screen. With this setting, the view simply does not scroll (move and bounce), when I add like 20 items it works.

How can I force the collection view to scroll, without enough items to fill the screen?


(source: bytolution.com)

Thanks for your help!

BTW I already tried to set the contentSize (e.g. to {320 , 1000}) but it still does not work.

like image 519
Dario Avatar asked Apr 18 '13 09:04

Dario


1 Answers

Try to set alwaysBounceVertical property to YES:

self.collectionView.alwaysBounceVertical = YES;

The default value is NO

like image 162
boweidmann Avatar answered Oct 06 '22 06:10

boweidmann