I have a viewController with a UITableView
, the rows of which I allow to edit (delete) with a swipe - much like in the Mail app. I do it with, among other, this met
I know this is an old post, but I recently had this problem, and thought others might benefit from what I found: I am using Xcode 9 and iOS 11, and I am employing the new method of using a SearchController. If I clicked the system back button while I was searching, I got the fatal on tableView(_: canEditRowAt indexPath:). Changing setEditing to false did not solve my issue. The problem was that I returned true/false in my canEditRowAt override depending upon if my data source had records, but when I was searching, I had a different data source (a filtering array). Once I checked against the right data source, the back button worked.