title: SWIFT: Insert Section / Rows into UICollectionView by clicking a UIButton
body: <p>I am trying to setup an UIButton that click it would add a new section into my UICollectionView. I've searched for some examples online, but could make them work. Following is one of the answers which looks fine, but still not working for me.</p>
  
  <p>Am I missing something? Could anyone provide some help? Many thanks in advance!</p>
  
  <pre><code>func buttonAction(sender:UIButton!) {
      var paths = [NSIndexPath]()
      paths.append(NSIndexPath(forRow: 0, inSection: 0))
      self.table.insertItemsAtIndexPaths(paths)
  }
  </code></pre>