自定义消息只接收不展示
//添加监听者
NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
[defaultCenter addObserver:self selector:@selector(networkDidReceiveMessage:)
name:kJPFNetworkDidReceiveMessageNotification object:nil];
//在APP打开的情况下,接收自定义的方法
- (void)networkDidReceiveMessage:(NSNotification *)notification {
//处理通知的方法
NSDictionary *userInfo = [notification userInfo];
}
网友评论