I am trying to have UICollectionView Cell Size equal to width and height of the UICollectionView.
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
CGSize size=collectionView.bounds.size;
return CGSizeMake(414.0, 586.0);
}
If I use size then it throws Autolayout error the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values. as the height is
650.0; It works fine if I set the height to 586.0f
UICollectionView frame = (0 0; 414 650);
contentOffset: {0, 0}; contentSize: {0, 514}
So, how can i fix this height issue?