I Use trailingSwipeActionsConfigurationForRowAt in IOS11 but when swipe multiple then app cracked.
func tableView(_ tableView: UITableView, trailingSwipeActi
TL;DR - look if you are doing something with your data (e.g. reloading) between your swipes.
I had similiar issue when I swipe-to-delete one cell (leaving it in edit mode - delete action visible) and then trying to swipe another caused that my app crashed. In my case it was because reloading table data in between those swipes.
Swipe-to-delete gesture calls willBeginEditingRowAtIndexPath
and didEndEditingRowAtIndexPath
methods on UITableViewDelegate
object. In the latter one I called tableView.reloadData()
. When I swipe-to-delete other cell I got didEndEditingRowAtIndexPath
method called for the first cell (also reloading data) and just after that system called willBeginEditingRowAtIndexPath
for the other cell and the data was out of sync and UIKit crashes.
When I removed the code that reloading data in didEndEditingRowAtIndexPath
method my app won't crashes anymore :)