Type Method

automaticallyNotifiesObserversForKey:

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

Declaration

+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key;

Return Value

YES if the key-value observing machinery should automatically invoke willChangeValueForKey:/didChangeValueForKey: and willChange:valuesAtIndexes:forKey:/didChange:valuesAtIndexes: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

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

+ keyPathsForValuesAffectingValueForKey:

Returns a set of key paths for properties whose values affect the value of the specified key.

+ setKeys:triggerChangeNotificationsForDependentKey:

Configures the observed object to post change notifications for a given property if any of the properties specified in a given array changes.

Deprecated
observationInfo

Returns a pointer that identifies information about all of the observers that are registered with the observed object.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software