【问题标题】:update UITableView when section is removed from NSFetchedResultsController从 NSFetchedResultsController 中删除部分时更新 UITableView
【发布时间】:2011-06-22 09:31:06
【问题描述】:

UITableView 问题:

我使用 Core Data 和这个委托方法来更新我的表格视图(当然还有一对 willChange 和 didChange)

- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo
       atIndex:(NSUInteger)sectionIndex
 forChangeType:(NSFetchedResultsChangeType)type {

如果我在此委托方法的末尾不询问 reloadData,为什么我的表格视图下的部分没有更新?!

【问题讨论】:

    标签: ios core-data


    【解决方案1】:

    如果没有看到您的代码,很难判断。但是,看起来很愚蠢,您可能忘记设置 NSFetchedResultsController 的委托。在您的代码中检查这一点。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多