I was wondering how I could do the following.
I want to have the UICollectionViewCell
span the complete width of the screen whilst having a dynamic height that I can adjust with Autolayout. I understand the Autolayout concept for the problem but I am using the following code and it is fixing the height of the cell instead.
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
int width = [[UIScreen mainScreen] bounds].size.width - 16;
return CGSizeMake(width, 180);
}