美文网首页
GCD 通知

GCD 通知

作者: Fade1992 | 来源:发表于2020-04-10 16:12 被阅读0次
/** 通知 */
@property (nonatomic,weak)id notice;
//    WS(weakSelf);
    _notice = [[NSNotificationCenter defaultCenter] addObserverForName:NOTIFICATION_DEL_COMPETITION_DATA_BJDC object:nil queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) {
        NSLog(@"通知方法调用");
    }];
- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

相关文章

网友评论

      本文标题:GCD 通知

      本文链接:https://www.haomeiwen.com/subject/axnrmhtx.html