I am using UICollectionView with a Storyboard and trying to subclass UICollectionViewFlowLayout, but it does not seem to work.
I created a subclass of CollectionViewFlowLayout :
#import "CollectionViewFlowLayout.h" @implementation CollectionViewFlowLayout -(id)init { NSLog(@"Init of CollectionViewFlowLayout"); if (!(self = [super init])) return nil; self.itemSize = CGSizeMake(250, 250); return self; } @end
And in the storyboard identification inspector, I changed the class for the stream layout:

But when I save / build / run, itemSize is not set to 250 and my NSLog is not output.
I saw in examples like this that you can set the layout in the collectionView controller, but I kind of assumed that it wasnβt necessary if you set it to the storyboard.
Callmeed
source share