Latest 1.0.0
Homepage https://github.com/zhangchiqing/KVOHelper
License MIT
Platforms ios 5.0, requires ARC
Authors

Make iOS Key-Value Observing programming easier

Usage

pod 'KVOHelper'
#import "KVOHelper.h"

- (id)init {
    if (self = [super init]) {
        [KVOHelper mixinHandlerToKVOContextForClass:self.class];

        [self.account addObserver:self forKeyPath:@"name" options:NSKeyValueObservingOptionNew context:@selector(onAccountNameChanged:)];

        self.account.name = @"My Account"; // this will trigger onAccountNameChanged:
    }
    return self;
}

- (void)onAccountNameChanged:(NSDictionary)change {
    NSString *accountName = [change objectForKey:@"new"];
    self.accountNameLabel.text = [NSString stringWithFormat:@"%@", accountName];
}

Latest podspec

{
    "name": "KVOHelper",
    "version": "1.0.0",
    "summary": "Make ios Key-Value Observing programming easier.",
    "homepage": "https://github.com/zhangchiqing/KVOHelper",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "zhangchiqing": "[email protected]"
    },
    "source": {
        "git": "https://github.com/zhangchiqing/KVOHelper.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": "KVOHelper.{h,m}",
    "public_header_files": "KVOHelper.h",
    "exclude_files": "Classes/Exclude",
    "requires_arc": true
}

Pin It on Pinterest

Share This