NSNotificationCenter通知,用userInfo实现
来源:互联网 发布:喜马拉雅fm连不上网络 编辑:程序博客网 时间:2024/06/05 23:30
1、发通知
2、接受通知
3、调用方法,接受信息。
NSDictionary *myDictionary = [NSDictionary dictionaryWithObject:@"sendValue" forKey:@"sendKey"];[[NSNotificationCenter defaultCenter] postNotificationName:@"myNotice" object:nil userInfo:myDictionary];
2、接受通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(noticeMethod:) name:@"myNotice" object:nil];
3、调用方法,接受信息。
- (void)noticeMethod:(NSNotification *)notification{NSString *getsendValue = [[notification userInfo] valueForKey:@"sendKey"];}
0 0
- NSNotificationCenter通知,用userInfo实现
- NSNotificationCenter通知,用userInfo实现
- NSNotificationCenter 通知
- 通知NSNotificationCenter
- 通知--NSNotificationCenter
- 通知NSNotificationCenter
- NSNotificationCenter通知
- NSNotificationCenter 通知中心实现传值
- IOS NSNotificationCenter(通知中心)实现原理
- iOS: NSNotificationCenter的方法postNotificationName:object:userInfo:
- 获取键盘通知的 UserInfo
- iOS通知中心传值实现(NSNotificationCenter)(2)
- 使用NSNotificationCenter 事件通知
- 通知中心NSNotificationCenter
- 通过NSNotificationCenter发送通知
- 使用NSNotificationCenter 事件通知
- NSNotificationCenter通知接收多次
- 通知中心 NSNotificationCenter
- Louis Vuitton Outlet Sunglasses 6x25S
- 【activiti】常用API
- android粒子进度条
- 第七周项目一编辑编译运行第一个程序
- UVA - 10400 Game Show Math(回溯)
- NSNotificationCenter通知,用userInfo实现
- IOS键盘的相关设置(UITextfield)
- BZOJ 2716 Violet 3 天使玩偶 CDQ分治
- 几篇不错的关于android启动过程分析文章
- python optparse 入门练习
- [第三弹]利用ajax技术,验证用户名是否被占用
- C++_数学答题并给出分数
- iOS8 App Extension编程 TodayViewController [实战总结]
- 国家/地区字符串