I am building an app that uses a collection view to display data that can be deleted by users.
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)?
In principle, I want to do something like this, but in Swift: link
I'd be grateful for any help! Thanks
Here is a Swift version: