title: UICollectionView reuseIdentifier in sizeForItemAtIndexPath - swift
body: <p>I have the following code, which puts a collection view into either one or two columns, depending the size of the screen:</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -&gt; CGSize {
      let size = collectionView.frame.width
      if (size &gt; 500) {
          return CGSize(width: (size/2) - 8, height: (size/2) - 8)
      }
      return CGSize(width: size, height: size)
  }
  </code></pre>
  
  <p>I would like to amend this, so the height is dependent upon the reuseIdentifier. There are two I use - set something like this:</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
      let diceRoll = Int(arc4random_uniform(2) + 1)
      var cell = collectionView.dequeueReusableCellWithReuseIdentifier("profileViewCell", forIndexPath: indexPath)
      if(diceRoll == 1) {
          cell = collectionView.dequeueReusableCellWithReuseIdentifier("profileChartViewCell", forIndexPath: indexPath)
      }
      return cell
  }
  </code></pre>
  
  <p>How can I get the reuseIndentifier of the current cell, so that I can change the height depending on what type of cell it is?</p>