Building off @Warewolf's answer, the next step is to create your own custom cell.
Go to File -> New -> File -> User Interface -> Empty -> Call
this nib "customNib"
.
In your customNib
drag a UICollectionView
Cell in. Give it reuse cell identifier @"Cell"
.
File -> New -> File -> Cocoa Touch Class -> Class
named "CustomCollectionViewCell"
subclass if UICollectionViewCell
.
Go back to the custom nib, click cell and make this custom class "CustomCollectionViewCell"
.
Go to your viewDidLoad
viewcontroller
and instead of
[_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"cellIdentifier"];
have
UINib *nib = [UINib nibWithNibName:@"customNib" bundle:nil];
[_collectionView registerNib:nib forCellWithReuseIdentifier:@"Cell"];
Also, change (to your new cell identifier)
UICollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];