title: Collection View isn't being displayed, cellForItemAtIndexPath is never called
body: <p>I have a <code>UITableView</code> with custom cells containing <code>UIStackView</code>. As part of preparing a new cell, when the Table View adds new cells via its <code>cellForRowAtIndexPath</code> method, it instantiates and adds any collection views (of type <code>MultaCollectionView</code>) and any <code>UILabel</code> which need to be added to the cell’s Stack View (a cell may include various collection views). In theory, a stack view contains a sequence of Labels and Collection Views.</p>
  
  <p>Although labels are displaying correctly, the Collection View is not being displayed at runtime. The Collection View I’m attempting to display is defined in a <code>.xib</code> Interface Builder document.</p>
  
  <p>The Collection View’s <code>numberOfSectionsInCollectionView</code> method is getting called, however the <code>collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath)</code> method is never called.</p>
  
  <p>Why is the <code>collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath)</code> method never called? Why aren’t Collection Views being rendered in the Stack View?</p>
  
  <pre><code>import UIKit
  private let reuseIdentifier = "Cell"
  
  class MultaCollectionView: UICollectionView, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UICollectionViewDelegate {
      required init?(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          self.delegate = self
          self.dataSource = self
      }
      class func instanceFromNib() -&gt; UICollectionView {
          return UINib(nibName: "multas", bundle: nil).instantiateWithOwner(nil, options: nil)[0] as! UICollectionView
      }
  
      func numberOfSectionsInCollectionView(collectionView: UICollectionView) -&gt; Int {
          return 1
      }
  
  
      func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
          return 2
      }
  
      func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
          let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath)
          return cell
      }
  
  }
  </code></pre>
  
  <p>The parent <code>TableView</code> adds Cells via the following method:</p>
  
  <pre><code>func addSubviewsToCellStack(cell: ArticuloTableViewCell, texto: [[String: String]]) {\            
      if isLabel == true {
              let label = UILabel()
              label.text = "blah"
              subview = label
              cell.textoStack.addArrangedSubview(subview)
          } else {
              let colview = MultaCollectionView.instanceFromNib() 
              cell.textoStack.addArrangedSubview(colview)
          }                        
      }
  
  }
  </code></pre>