Search code examples
ios6uiscrollviewuicollectionview

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.


Solution

  • Try to set alwaysBounceVertical property to YES:

    self.collectionView.alwaysBounceVertical = YES;
    

    The default value is NO