title: UICollectionView with two custom cells in a section
body: <p>I am working on a medical billing application and I have two cells that are for two different types of medical codes. The first is a visit code and the second is a diagnoses code. There can be many diagnoses codes that are added to a particular visit code and I am trying to make a section consist of a single visit code and any number of diagnoses codes (including zero). </p>
  
  <pre><code>var icdCodes:[[(icd10:String,icd9:String)]] = [[]]  //A list of diagnoses codes for the bill
  var visitCodes:[String] = [] //A list of the visit codes that have been added
  </code></pre>
  
  <p>Currently I have a UICollectionView that I add visit codes to. I am having problems with displaying all of the icd10 cells for each visitCode cell. I can dequeue an "ICD10Cell" but I am not sure if the cell at indexPath is a visitCodeCell or an ICD10Cell.  My dataSource code is below:</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return icdCodes[section].count + 1 //add 1 for the initial visitcode cell
  }
  
  func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
  
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier("visitCodeCell", forIndexPath: indexPath) as! CodeTokenCollectionViewCell
  
      cell.visitCodeLabel.text = visitCodes[indexPath.row]
  
      cell.deleteCodeButton.tag = indexPath.row
      return cell
  }
  
  func numberOfSectionsInCollectionView(collectionView: UICollectionView) -&gt; Int {
  
      return visitCodes.count
  }
  </code></pre>
  
  <p>Does anyone know how I could achieve the kind of functionality I am looking for? </p>