cellForItemAtIndexPath not called but numberOfItemsInSection does

Ok I think this could be useful for future problems with this...

It was because of constraints on the StoryBoard. I don't really understand why that happens, because I just had fixed an horizontal space. I removed the horizontal space as constraint for that View and everything works fine.

Well, let's life flow.


I also face same issue and finally got to know that i have passed wrong class object for collectionViewLayout , i change to UICollectionViewFlowLayout instead of UICollectionViewLayout while creating object for UICollectionView like below its stared calling all delegate method.

 collectionView = UICollectionView(frame: CGRectMake(5, 0, 400, 40) , collectionViewLayout: UICollectionViewFlowLayout())

I meet this problem too. I checked all the possible issues, everything looks ok. Then I tried to changed the reload methods.

[self.colView reloadData] -> [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:x]];

Then all things worked. However I still don't understand how.