Raises an exception.
SDKs
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
Parameters
observer
The object to remove as an observer.
keyPath
A key-path, relative to the set, for which
observer
is registered to receive KVO change notifications. This value must not benil
.context
The context passed to the notifications.
Discussion
NSArray
objects are not observable, so this method raises an exception when invoked on an NSArray
object. Instead of observing a array, observe the ordered to-many relationship for which the array is the collection of related objects.