title: How to remove Section according to indexpath in CollectionView in swift?
body: <p>my functionality is when i remove on close button section and data also be removed from indexpath.</p>
  
  <p>i have taken UICollelctionReusableView for Section.</p>
  
  <p>section count is according to array of number of Apple Data.</p>
  
  <p>i have attached image</p>
  
  <p><a href="https://i.stack.imgur.com/z936z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z936z.png" alt="Header"></a></p>
  
  <p>and data is attached to header
  like header and one row.</p>
  
  <p>i want to remove section and row when i tap on close button.
  can anyone help me to findout solution?</p>
  
  <p>sample code</p>
  
  <pre><code>  var index:NSIndexPath = sender.tag
      array.removeAtIndex(indexPath.row())
      self.coll.deleteItemsAtIndexPaths([sender.tag])
  </code></pre>