title: Is there a way to find the index of a UICollectionView section?
body: <p>Is there a way to find the index of a UICollectionView section?</p>
  
  <p>My CollectionView is populated by arrays that are contained in a master array, and I need to select the appropriate one for the section.</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
  
      let collectionCell: ChecklistCollectionViewCell = collectionView.dequeueReusableCellWithReuseIdentifier("collectionCell", forIndexPath: indexPath) as! ChecklistCollectionViewCell
  
      let section = //I need the index of the current section here!
  
      let sectionArray = allCards[section]
  
      collectionCell.imageCell.image = UIImage(named: sectionArray[indexPath.row])
  
      return collectionCell
  
  }
  </code></pre>
  
  <p>Similar to how it is done here:</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
  
      let sectionArray = allCards[section]
      return sectionArray.count
  
  }
  </code></pre>