How does one program the ability to swipe a UITableCell. I already have a subclass that I've been working with of UITableCell. Do I just handle swipes in it, like I would a view?
Asked
Active
Viewed 666 times
1 Answers
1
You will need to implement this method:
tableView:editingStyleForRowAtIndexPath:
and return UITableViewCellEditingStyleDelete
To make it work you'll also want to implement these methods:
tableView:commitEditingStyle:forRowAtIndexPath:
tableView:canEditRowAtIndexPath:
To customize the text of the delete button see this thread: UITableView Swipe to delete: how to customize button and action?
Community
- 1
- 1
theChrisKent
- 14,981
- 3
- 59
- 61