title: Set size of individual UICollectionView cell
body: <p>Is there a way to change the size of the first cell only in a <code>UICollectionView</code> and assign the other cells a different size?</p>
  
  <p>I've tried doing something like this but it doesn't work:</p>
  
  <pre><code>func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: IndexPath) -&gt; CGSize {
      if (indexPath == 0){
          return CGSize(200, height: 200)
      } else {
          return CGSize(300, height: 300)
      }
  }
  </code></pre>