Open LowkeyCoder2000 opened 4 months ago
I implemented it a bit differently by leveraging the SwipeCellKit Library. Specifically, I utilized the .destructiveAfterFill
property value for that. Additionally, there is no need for DispatchQueue.main.async
for updating the view on the main thread in this context.
Here is the code demonstrating how it's implemented:
func tableView(_ tableView: UITableView, editActionsOptionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> SwipeOptions {
var options = SwipeOptions()
options.expansionStyle = .destructiveAfterFill
return options
}
This approach ensures the desired behavior without the need for additional thread management or any delay handling.
I believe that the there is a deletion problem.When deleting the cell animation is not fully shown. I've ran into this problem before and this is what worked for me:
swipeAction.fulfill(with: .delete)