草庐IT

batchUpadate

全部标签

ios - 核心数据 NSFetchedResultsController 在设备上进行 batchUpadate 后未更新,但在模拟器上正常

我有一个NSFetchedResultsController来管理我的UITableView数据源。我正在尝试使用NSBatchUpdateRequest修改名为amountToCompute的NSManagedObject的属性。所以我创建了批量更新:letbatchUpdate=NSBatchUpdateRequest(entityName:"MyEntity")batchUpdate.propertiesToUpdate=["amountToCompute":newAmount]batchUpdate.resultType=.UpdatedObjectIDsResultType我