<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSFetchedResultsControllerDelegate/controller(_:didChangeContentWith:)-5ullb",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(pl)NSFetchedResultsControllerDelegate(im)controller:didChangeContentWithDifference:"
  },
  "title" : "controller(_:didChangeContentWith:)"
}
-->

# controller(_:didChangeContentWith:)

Notifies the receiver about changes to the content in the fetched results controller, by using a collection difference.

```
optional func controller(_ controller: NSFetchedResultsController<any NSFetchRequestResult>, didChangeContentWith diff: CollectionDifference<NSManagedObjectID>)
```

## Discussion

This method is only invoked if the controller’s [`sectionNameKeyPath`](/documentation/CoreData/NSFetchedResultsController/sectionNameKeyPath) property is `nil` and [`controller(_:didChangeContentWith:)`](/documentation/CoreData/NSFetchedResultsControllerDelegate/controller(_:didChangeContentWith:)-4kezq) is not implemented.

If this method is implemented, no other delegate methods are invoked.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)