---
title: "didChangeValue(forKey:withSetMutation:using:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nsmanagedobject/didchangevalue(forkey:withsetmutation:using:)"
---

# didChangeValue(forKey:withSetMutation:using:)

Provides an opportunity to respond when a change was made to a specified to-many relationship.

## Declaration

```swift
func didChangeValue(forKey inKey: String, withSetMutation inMutationKind: NSKeyValueSetMutationKind, using inObjects: Set<AnyHashable>)
```

## Parameters

- `inKey`: The name of a property that is a to-many relationship.
- `inMutationKind`: The type of change that was made.
- `inObjects`: The objects that were involved in the change (see doc://com.apple.documentation/documentation/Foundation/NSKeyValueSetMutationKind).

## Discussion

Discussion For more details, see Key-Value Observing Programming Guide. You must not override this method.

## See Also

### Supporting Key-Value Observing

- [didAccessValue(forKey:)](coredata/nsmanagedobject/didaccessvalue(forkey:).md)
- [observationInfo()](coredata/nsmanagedobject/observationinfo().md)
- [setObservationInfo(_:)](coredata/nsmanagedobject/setobservationinfo(_:).md)
- [willAccessValue(forKey:)](coredata/nsmanagedobject/willaccessvalue(forkey:).md)
- [didChangeValue(forKey:)](coredata/nsmanagedobject/didchangevalue(forkey:).md)
- [willChangeValue(forKey:)](coredata/nsmanagedobject/willchangevalue(forkey:).md)
- [willChangeValue(forKey:withSetMutation:using:)](coredata/nsmanagedobject/willchangevalue(forkey:withsetmutation:using:).md)
