---
title: "controller(_:didChangeContentWith:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nsfetchedresultscontrollerdelegate/controller(_:didchangecontentwith:)-5ullb"
---

# controller(_:didChangeContentWith:)

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

## Declaration

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

## Discussion

Discussion This method is only invoked if the controller’s sectionNameKeyPath property is nil and controller(_:didChangeContentWith:) is not implemented. If this method is implemented, no other delegate methods are invoked.

## See Also

### Responding to Changes

- [controller(_:didChangeContentWith:)](coredata/nsfetchedresultscontrollerdelegate/controller(_:didchangecontentwith:)-4kezq.md)
- [controllerWillChangeContent(_:)](coredata/nsfetchedresultscontrollerdelegate/controllerwillchangecontent(_:).md)
- [controller(_:didChange:at:for:newIndexPath:)](coredata/nsfetchedresultscontrollerdelegate/controller(_:didchange:at:for:newindexpath:).md)
- [controller(_:didChange:atSectionIndex:for:)](coredata/nsfetchedresultscontrollerdelegate/controller(_:didchange:atsectionindex:for:).md)
- [controllerDidChangeContent(_:)](coredata/nsfetchedresultscontrollerdelegate/controllerdidchangecontent(_:).md)
