title: UICollectionViewCell Width 100% & Dynamic Height
body: <p>I was wondering how I could do the following.</p>
  
  <p>I want to have the <code>UICollectionViewCell</code> 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.</p>
  
  <pre><code>-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
  
      int width = [[UIScreen mainScreen] bounds].size.width - 16;
  
      return CGSizeMake(width, 180);
  }
  </code></pre>