I am using UICollectionView
using the flow layout.
I have made a custom UICollectionViewCell
for the same.
But on running the project the console k
I just ran into the same error message, but for me the issue was that when I received new data from the api and tried to refresh my collectionView, the method that called [collectionView reloadData]
wasn't calling it on the main thread.
Hope this helps someone...
For me the solution was to set Estimate Size
(in the storyboard size attributes pane) for the collection view to None
.
That fixed my problem:
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return CGSizeMake(self.collectionView.frame.size.width, self.collectionView.frame.size.height - 70);
}
U can see padding value from top and bottom on this screen: