Skip to content

kazyk/KZObserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KZObserver

ObjC KVO support utils

example

id dataObject = [[SomeDataObject alloc] init];
id viewObject = [[SomeViewObject alloc] init];

{
    KZObserver *observer = [[KZObserver alloc] initWithTarget:dataObject destination:viewObject];
    [observer bindValueFromKeyPath:@"property1" toKeyPath:@"property2"];
    
    [dataObject setProperty1:@"value"];
    STAssertEquals([viewObject property2], @"value", @"");
}

//KVO is removed when observer is deallocated

license

MIT License

About

ObjC KVO support utility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published