NSFetchedResultsChangeUpdate
全部标签 我想知道NSFetchedResultsChangeUpdate更改类型在controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:方法中是什么时候传递的?我已经使用非零sectionNameKeyPath创建了NSFetchedResultsController并获取了具有sortDescriptor的请求。添加了几个与获取的请求谓词匹配的对象。然后我尝试了更改其中一个对象的排序属性和sectionNameKeyPath属性。实际上它工作正常:更改对象在tableView周围移动,但每次我收到NSFetched
我收到这个警告:枚举值'NSFetchedResultsChangeMove'和NSFetchedResultsChangeUpdate'未在开关中处理有什么想法吗?-(void)controller:(NSFetchedResultsController*)controllerdidChangeSection:(id)sectionInfoatIndex:(NSUInteger)sectionIndexforChangeType:(NSFetchedResultsChangeType)type{switch(type){caseNSFetchedResultsChangeInsert
我以为我gotit.但是我在我的应用程序中发现的一个新崩溃表明情况并非如此。因此,当newIndexPath为非零且与Controller中的indexPath不同时,任何人都知道NSFetchedResultsChangeUpdate的真正正确代码:didChangeObject:atIndexPath:forChangeType:newIndexPath:? 最佳答案 我刚刚在更新时遇到了崩溃,当该索引路径与检索所需的索引路径不匹配时,似乎newIndexPath被提供为获取的结果Controller对象的索引路径表中的单元格。
我有一个以下列方式启动的NSFetchedResultsController:NSEntityDescription*myEntity=[NSEntityDescriptionentityForName:@"MyEntity"inManagedObjectContext:managedObjectContext];NSFetchRequest*fetchRequest=[[NSFetchRequestalloc]init];[fetchRequestsetEntity:myEntity];[fetchRequestsetFetchBatchSize:10];[fetchRequests