TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Apr 2016 |
Maintained by Unclaimed.
对通知的封装,通过block使得结构紧凑。
#import "WZXNotificationManager.h"
给name为xxx的通知添加观察者,以及发送通知时的回调
[[WZXNotificationManager manager]addNotiWithName:xxx andComplete:^(NSDictionary *infoDic) {
NSLog(@"%@",infoDic);
}];
发送name为xxx的通知,并传去一个字典
[[WZXNotificationManager manager]postNotiWithName:xxx andObject:nil andUserInfo:@{
@"name":@"wzx"
}];
self移除name为xxx的通知
[[WZXNotificationManager manager]removeNotiWithName:xxx];
self移除所有通知
[[WZXNotificationManager manager]removeAllNoti];