title: Set up a UICollectionView delete button in Swift
body: <p>I am building an app that uses a collection view to display data that can be deleted by users.</p>
  
  <p>In the prototype cell, I created a button that now appears in every cell that is created (a small X). How can I set the button up to tell me which cell should be deleted (like indexPath.row)?</p>
  
  <p>In principle, I want to do something like this, but in Swift: <a href="https://stackoverflow.com/questions/10761086/correctly-grab-the-indexpath-row-of-a-uibutton-in-custom-table-cell">link</a></p>
  
  <blockquote>
    <p>I'd be grateful for any help! Thanks</p>
  </blockquote>