Assertion failure in -[UITableView _endCellAnimationsWithContext:]

前端 未结 12 1638
走了就别回头了
走了就别回头了 2020-12-08 03:41

Hopefully this will be a quick fix. I have been trying to figure out the error that i keep getting. The error is listed below and the appdelagate is below that.

An

12条回答
  •  半阙折子戏
    2020-12-08 04:17

    If you're using an NSFetchedResultsController like me and updating data in a background thread, don't forget to begin and end updates in the delegate:

    - (void)controllerWillChangeContent:(NSFetchedResultsController *)controller {
        [self.tableView beginUpdates];
    }
    
    - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
        [self.tableView endUpdates];
    }
    

提交回复
热议问题