func observeValue (forKeyPath : String?, of: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
Informs the observing object when the value at the specified key path relative to the observed object has changed.
Technology
You can observe any object properties including simple attributes, to-one relationships, and to-many relationships. Observers of to-many relationships are informed of the type of change made — as well as which objects are involved in the change.
NSObject
provides an implementation of the NSKeyValueObserving protocol that provides an automatic observing capability for all objects. You can further refine notifications by disabling automatic observer notifications and implementing manual notifications using the methods in this protocol.
func observeValue (forKeyPath : String?, of: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
func addObserver (NSObject, forKeyPath : String, options: NSKeyValueObservingOptions, context: UnsafeMutableRawPointer?)
func removeObserver (NSObject, forKeyPath : String)
func removeObserver (NSObject, forKeyPath : String, context: UnsafeMutableRawPointer?)
func willChangeValue (forKey : String)
func didChangeValue (forKey : String)
func willChange (NSKeyValueChange, valuesAt : IndexSet, forKey : String)
func didChange (NSKeyValueChange, valuesAt : IndexSet, forKey : String)
func willChangeValue (forKey : String, withSetMutation : NSKeyValueSetMutationKind, using: Set<AnyHashable>)
func didChangeValue (forKey : String, withSetMutation : NSKeyValueSetMutationKind, using: Set<AnyHashable>)
class func automaticallyNotifiesObservers (forKey : String) -> Bool
class func keyPathsForValuesAffectingValue (forKey : String) -> Set<String>
var observationInfo : UnsafeMutableRawPointer?
enum NSKeyValueChange
struct NSKeyValueObservingOptions
struct NSKeyValueChangeKey
enum NSKeyValueSetMutationKind