I have a tableview with a custom cell that include a button, this button should delete the entry (and reload the tableview) after it been hit.
So i m looking for a way to get the index path of the cell from the botton?
I have a tableview with a custom cell that include a button, this button should delete the entry (and reload the tableview) after it been hit.
So i m looking for a way to get the index path of the cell from the botton?
In your cellForRowAtIndexPath:
method you can define a tag for your UIButton
.
Something like
cell.button.tag = indexPath.row
Then when the buttons action is triggered you can get the indexPath
via button.tag
.