首页 > 移动平台 > 详细

ios 广播传值

时间:2018-03-10 21:20:44      阅读:202      评论:0      收藏:0      [点我收藏+]

[[NSNotificationCenter defaultCenter] postNotificationName:@"callOutWithChatter" object:@{@"chatter":self.chatter, @"type":[NSNumber numberWithInt:eCallSessionTypeVideo],@"isOrderChater":isOrderChatter}];?//广播端传递三个参数

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callOutWithChatter:) name:@"callOutWithChatter" object:nil];//广播中心接受

- (void)callOutWithChatter:(NSNotification *)notification

{   

id object = notification.object;  

NSString *chatter = [object objectForKey:@"chatter"];

}//接受到以后,在事件里面处理接收到参数,

ios 广播传值

原文:https://www.cnblogs.com/linusflow/p/8541772.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!