UITableViewAlertForLayoutOutsideViewHierarchy will no longer fire as a check has been added to make sure that the tableView’s window property is not nil before performing batch updates.
This commit is contained in:
Stuart Breckenridge
2023-03-13 08:58:49 +08:00
parent 57ba38929a
commit 9e85af2a79

View File

@@ -564,6 +564,8 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
return
}
if tableView.window == nil { return }
tableView.performBatchUpdates {
if let deletes = changes.deletes, !deletes.isEmpty {
tableView.deleteSections(IndexSet(deletes), with: .middle)