Latest 1.0.2
Homepage https://github.com/Wzxhaha/WZXNotification
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation
Authors

License
CocoaPods

对通知的封装,通过block使得结构紧凑。

如何使用

#import "WZXNotification.h"

给name为xxx的通知添加观察者,以及收到通知时的回调
[[WZXNotification manager]addNotiWithName:xxx andComplete:^(NSDictionary *infoDic) {
        NSLog(@"%@",infoDic);
}];
发送name为xxx的通知,并传去一个字典
[[WZXNotification manager]postNotiWithName:xxx andObject:nil andUserInfo:@{
                       @"name":@"wzx" 
}];
self移除name为xxx的通知
[[WZXNotification manager]removeNotiWithName:xxx];

self移除所有通知
[[WZXNotification manager]removeAllNoti];

Latest podspec

{
    "name": "WZXNotification",
    "version": "1.0.2",
    "license": "MIT",
    "summary": "Package for NSNotificationCenter used on iOS, which implement by Objective-C.",
    "homepage": "https://github.com/Wzxhaha/WZXNotification",
    "authors": {
        "WzxJiang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Wzxhaha/WZXNotification.git",
        "tag": "1.0.2"
    },
    "requires_arc": true,
    "description": "For the NSNotificationCenter package, with block to make the structure compact.",
    "source_files": "WZXNotification/*",
    "platforms": {
        "ios": "7.0"
    },
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This