title: How to hide / unhide section in Collection View
body: <p>I have a collection view, this collection view has 3 section:</p>
  
  <p><strong>A</strong></p>
  
  <p><strong>B</strong></p>
  
  <p><strong>C</strong></p>
  
  <p>Then I want to hide section B, then it will look like:</p>
  
  <p><strong>A</strong></p>
  
  <p><strong>C</strong></p>
  
  <p>I have tried </p>
  
  <pre><code>collectionView.deleteSections(NSIndexSet(index: 1))
  </code></pre>
  
  <p>but it crashes and says:</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception
    'NSInternalInconsistencyException', reason: 'Invalid update: invalid
    number of sections.  The number of sections contained in the
    collection view after the update (3) must be equal to the number of
    sections contained in the collection view before the update (3), plus
    or minus the number of sections inserted or deleted (0 inserted, 1
    deleted).'</p>
  </blockquote>