//有参数的通知
[[NSNotificationCenterdefaultCenter]postNotificationName:@"YijianSend"object:niluserInfo:@{@"text":self.textViewStr}];
[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(YijianSend:)name:@"YijianSend"object:nil];
- (void)YijianSend:(NSNotification *)noti{
self.yjtextStr = noti.userInfo[@"text"];
}
-(void)dealloc{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
//有对象的参数 通知
[[NSNotificationCenterdefaultCenter] postNotificationName:@"ExitGroupToRemove"object:group];
//接收移除解散群组的通知
[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(ExitGroupToRemove:)name:@"ExitGroupToRemove"object:nil];
//解散群组接受通知
-(void)ExitGroupToRemove:(NSNotification *)noti{
EMGroup *group = noti.object;
[self.myGroupArrayremoveObject:group];
[self.tableViewreloadData];
}