Only my second time using UICollectionView\'s and perhaps I have bitten off more than I can chew but nevertheless:
I am implementing a UICollectionView (myCollection
In my case, changing UINavigationBar's translucent to NO solved the problem.
It was happening for me when item height == 0 by fixing that cellForItem method was called.
Ten minutes ago I also encountered this problem, I made a silly mistake.
My intention is to use UICollectionViewFlowLayout,
But because of mistakes, I used UICollectionViewLayout.
Make sure -(NSInteger) collectionView:numberOfItemsInSection: is returning a positive (read, greater than zero) value. It may be a matter of placing [self.collectionView reloadData]; in the completion handler.
I was using autolayout, and in my case height constraint was missing
For me, I update the height of self.view (the collectionView's superview) via autolayout, and MUST call layoutIfNeeded
after that.
[self.view mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.equalTo(@(height));
}];
[self.view layoutIfNeeded];