NSFetchedResultsController 不处理某些部分驱动的移动
我使用带有核心数据存储的 NSFetchedResultsController (frc)。我实现了所有 frc 委托方法。该表由后台线程偶尔更新。所有插入、删除和更新都工作正常,但更新到表底部的行(50 行)的 frc 索引键除外,不会导致部分移动。例如,如果“name”是索引键,并且名称“Victor”更改为“Alex”,则胜利者行现在显示名称 Alex,但不会与以 A 开头的所有其他名称一起移动到表的顶部。我注意到,这仅适用于表底部的行。如果像“Andy”这样的行更改为“Ben”,则 frc 确实正确处理了该移动。任何解决此问题的建议将不胜感激。我不使用 frc 缓存。谢谢
I utilize a NSFetchedResultsController (frc) with a Core Data store. I implement all the frc delegate methods. The table is sporadically updated by background threads. All the inserts, deletes and updates work fine, with the exception that updates to the frc's index key for rows toward to the bottom of the table (50 rows), do not result in a section move. e.g. if "name" is the index key and the name "Victor" is changed to "Alex", the victor row now shows the name Alex, but is not moved to the top of the table alongside all other names starting with A. As I noted, this is only for rows towards the bottom of the table. If a row like "Andy" is changed to "Ben", the move is indeed processed correctly by the frc. Any suggestions to fix this would be appreciated. I do not use a frc cache. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
4.0 之前的核心数据中的 FRC 和表视图部分存在一些棘手的问题。我建议在 4.0 中重新测试;如果它有效并且您需要兼容 3.x,则为 3.x 执行表重新加载以避免一些刷新问题。
更新
如果问题在 4.0 中仍然存在,那么我强烈建议构建一个测试用例来复制该问题。这将完成几件事:
我对此的建议还不够强烈。
There are a few twitchy issues with the FRC and table view sections in pre-4.0 Core Data. I would suggest retesting in 4.0; if it works and you need to be 3.x compliant then do table reloads instead for 3.x to avoid some of the refresh issues.
update
If the issue is persisting in 4.0, then I highly recommend building a test case to duplicate the issue. This will accomplish several things:
I cannot suggest this strongly enough.