Stops the observer object from receiving change notifications for the property specified by the key path relative to the object receiving this message, given the context.
- iOS 5.0+
- macOS 10.7+
- tvOS 9.0+
- watchOS 2.0+
The object to remove as an observer.
A key-path, relative to the observed object, for which
observeris registered to receive KVO change notifications.
Arbitrary data that more specifically identifies the observer to be removed.
Examining the value in
context you are able to determine precisely which
add invocation was used to create the observation relationship. When the same observer is registered for the same key-path multiple times, but with different context pointers, an application can determine specifically which object to stop observing. It is an error to call
remove if the object has not been registered as an observer.