I'm trying to do what is mentioned here:How to expand UICollectionView contentSize when paging enable?
All I want to do is override this method here so I could increase the collectionview content size. I'm assuming the rest should work fine because my custom layout, is inheriting from UICollectionViewLayout right?
- (CGSize)collectionViewContentSize
{
NSInteger itemCount = [self.collectionView numberOfItemsInSection:0];
NSInteger pages = ceil(itemCount / 16.0);
return CGSizeMake(320 * pages, self.collectionView.frame.size.height);
}
I made a custom UICollectionViewLayout and copy/paste the code of the first answer, but all I get is a blank page. I really have no idea of what I'm doing can someone show me how to properly Subclass and customize UICollectionViewLayout.