C# 클래스 KNFoundation.KNKVC.KNKVOObservable

Extension methods to provide Key-Value Observing methods to objects.
파일 보기 프로젝트 열기: bt-browser/KNFoundation

공개 메소드들

메소드 설명
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