Tepmnthar Tepmnthar - 1 month ago 14
Objective-C Question

sizeForItemAtIndexPath not work with custom flowLayout?

I've replaced default

UICollectionViewFlowLayout
with my custom subclass of
UICollectionViewFlowLayout
, and I found that
sizeForItemAtIndexPath
didn't work any longer.
Did I miss something, or I should set itemSize in my custom flowLayout?

Answer

In your subclass, use itemSize instead:

- (CGSize)itemSize
{
    return CGSizeMake(100,100);
}