C# Класс KNFoundation.KNKVC.KNKVOObservable

Extension methods to provide Key-Value Observing methods to objects.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddObserverToKeyPathWithOptions ( this o, KNKVOObserver observer, String keyPath, KNKeyValueObservingOptions options, Object context ) : void

Adds an observer to a KVO-compliant key path of the receiver.

DidChangeValueForKey ( this o, String key ) : void

If a given property doesn't support auto-KVO, this MUST be called after changing a value for the property to be KVO-compliant.

RemoveObserverFromKeyPath ( this o, KNKVOObserver observer, String keyPath ) : void

Removes an observer from a KVO-compliant key path of the receiver.

WillChangeValueForKey ( this o, String key ) : void

If a given property doesn't support auto-KVO, this MUST be called before changing a value for the property to be KVO-compliant.

Описание методов

AddObserverToKeyPathWithOptions() публичный статический Метод

Adds an observer to a KVO-compliant key path of the receiver.
public static AddObserverToKeyPathWithOptions ( this o, KNKVOObserver observer, String keyPath, KNKeyValueObservingOptions options, Object context ) : void
o this The object to be observed.
observer KNKVOObserver The object to receive the change notifications.
keyPath String The key path to observe.
options KNKeyValueObservingOptions A bitwise-OR of the desired options. See the KNKeyValueObservingOptions enum for details.
context Object A unique context to identify this observation.
Результат void

DidChangeValueForKey() публичный статический Метод

If a given property doesn't support auto-KVO, this MUST be called after changing a value for the property to be KVO-compliant.
public static DidChangeValueForKey ( this o, String key ) : void
o this The object that changed its key.
key String The key that changed.
Результат void

RemoveObserverFromKeyPath() публичный статический Метод

Removes an observer from a KVO-compliant key path of the receiver.
public static RemoveObserverFromKeyPath ( this o, KNKVOObserver observer, String keyPath ) : void
o this The object to remove the observation from.
observer KNKVOObserver The observer to remove.
keyPath String The key path of the observation to remove.
Результат void

WillChangeValueForKey() публичный статический Метод

If a given property doesn't support auto-KVO, this MUST be called before changing a value for the property to be KVO-compliant.
public static WillChangeValueForKey ( this o, String key ) : void
o this The object that will change its key.
key String The key that will change.
Результат void