I have an UITableView with multiple UITableViewCells. I implemented the following delegate methods to allow the user the "swipe-to-delete" functionallity.
UITableView -> canEditRowAtIndexPath
UITableView -> commitEditingStyle
It basically looks like this now:
But now i want to trigger the "swipe-gesture" manually from my code. I tryed to implement UITableView -> didSelectRowAtIndexPath and in there i was using cell.setEditing (true, animated: true). But it does not work. Any ideas on how i can do that?
Here is my current code:
var cell = tableView.cellForRowAtIndexPath (indexPath) as! UITableViewCell
cell.setEditing (true, animated: true)
Thanks!