---
title: "automaticallyNotifiesObservers(forKey:)"
framework: objectivec
role: symbol
role_heading: Type Method
path: "objectivec/nsobject-swift.class/automaticallynotifiesobservers(forkey:)"
---

# automaticallyNotifiesObservers(forKey:)

Returns a Boolean value that indicates whether the observed object supports automatic key-value observation for the given key.

## Declaration

```swift
class func automaticallyNotifiesObservers(forKey key: String) -> Bool
```

## Return Value

Return Value YES if the key-value observing machinery should automatically invoke willChangeValue(forKey:)/didChangeValue(forKey:) and willChange(_:valuesAt:forKey:)/didChange(_:valuesAt:forKey:) whenever instances of the class receive key-value coding messages for the key, or mutating key-value-coding-compliant methods for the key are invoked; otherwise NO.

## Discussion

Discussion The default implementation returns YES. Starting in OS X 10.5, the default implementation of this method searches the receiving class for a method whose name matches the pattern +automaticallyNotifiesObserversOf<Key>, and returns the result of invoking that method if it is found. Any found methods must return BOOL. If no such method is found YES is returned.

## See Also

### Observing Customization

- [keyPathsForValuesAffectingValue(forKey:)](objectivec/nsobject-swift.class/keypathsforvaluesaffectingvalue(forkey:).md)
- [NSKeyValueObservingCustomization](foundation/nskeyvalueobservingcustomization.md)
- [observationInfo](objectivec/nsobject-swift.class/observationinfo.md)
