UICollectionViewCells not appearing in a UICollectionView

There are some ways to debug this situation.

  1. Register UICollectionViewCell class instead of your customCell and set the cell's background color in cellForItem...

  2. If the cells are appearing in step one try to use your own cell class and set its background

Are you using storyboard? then..

You dont have to register any cell for the collection view. You can use the prototype cell, just give the proper id for the cell.You can design everything in your prototype cell. Custom class may not be needed in all the cases.


If you created the cell in the storyboard, then just remove the register class statement. You don't need to register anything (for a collection view or table view) if you make the cell in a storyboard (in fact, it screws things up if you do so). The only thing you need to do is make sure that you set the identifier in IB.


I had the same issue fixed with replacing conventional registercell line with below line

[self.collection registerNib:[UINib nibWithNibName:@"nibname" bundle:nil] forCellWithReuseIdentifier:identifier];

Swift 4.2 version: (thanks Nikolay Suvandzhiev)

self.collection.register(UINib(nibName: "nibname", bundle: nil), forCellWithReuseIdentifier: identifier)