且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查UICollectionView中插入和删除的项目,看到意外删除的项目

更新时间:2023-12-02 18:37:34

***解决方案:获取实体在获取的结果控制器中,按 parent 过滤。

Best solution: Fetch the Child entity in your fetched results controller, filter by parent.

对于插入,使用 NSFetchedResultsControllerDelegate 的纯香草实现。这将提供一个很好的动画或让你添加自己的。

For inserts, use the plain vanilla implementation of the NSFetchedResultsControllerDelegate. This will provide a nice animation or let you add your own.