How to do a Swipe to Delete when using UITableViewDiffableDataSource

When using UITableViewDiffableDataSource I notice that the following code is not called:


    override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
        return true
    }


so it's not possible to do a Swipe to Delete actions. Do I missed something?

Accepted Answer

Do note that UITableViewRowAction is deprecated. Have you moved to UISwipeActionsConfiguration and is that not working?

Thank you. It worked 🙂

How to do a Swipe to Delete when using UITableViewDiffableDataSource
 
 
Q