1
我正在使用NSFetchedResultsController,我不知道如何解决我目前的问题。 我的表格视图中的标题是单元格而不是真正的标题,因为我不希望标题在滚动时粘在顶部。NSFetchedResultsController与自定义单元格
的信息是关于它的很清楚:
CoreData: error: Serious application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. Invalid update: invalid number of rows in section 1. The number of rows contained in an existing section after the update (2) must be equal to the number of rows contained in that section before the update (0), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out). with userInfo (null)
但中行的部分号码后1行的插入必须是2!我怎么让桌面视图知道这个?我已经在做这样的东西:
indexPath = [NSIndexPath indexPathForRow:indexPath.row + 1
inSection:section];
newIndexPath = [NSIndexPath indexPathForRow:newIndexPath.row + 1
inSection:section];
但在这是行不通的这种特殊情况下,先泻后一切正常,像它应该,因为这是唯一的一次有两个单元格,而只有一个从核心数据本身。