WZXNotification 1.0.2

WZXNotification 1.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2016

Maintained by Unclaimed.


Downloads

Total15
Week0
Month0

Installs

Apps4
powered by Segment

  • By
  • WzxJiang

对通知的封装,通过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];