NSNotificationCenter--消息机制
来源:互联网 发布:怎么加入农村淘宝网 编辑:程序博客网 时间:2024/06/08 13:50
用法:
[[NSNotificationCenter defaultCenter] postNotificationName:@"事件名称" object:nil]; //发出通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(abc:) name:@"事件名称" object:nil];//接收受通知
object: 可以跟参数。
在接收到通知后进入 abc: 方法。
//最后移除通知
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
0 0
- NSNotificationCenter消息机制
- 消息通信机制NSNotificationCenter
- 消息通信机制NSNotificationCenter
- 消息通信机制NSNotificationCenter
- 消息通信机制NSNotificationCenter
- 消息通信机制NSNotificationCenter
- 消息通信机制NSNotificationCenter
- NSNotificationCenter消息机制
- IOS 消息机制(NSNotificationCenter)
- IOS 消息机制(NSNotificationCenter)
- IOS 消息机制(NSNotificationCenter)
- IOS 消息机制(NSNotificationCenter)
- IOS 消息机制(NSNotificationCenter)
- IOS 消息机制(NSNotificationCenter)
- NSNotificationCenter --- 消息机制
- IOS 消息机制(NSNotificationCenter)
- IOS 消息机制(NSNotificationCenter)
- NSNotificationCenter--消息机制
- poj2828 BuyTickets 线段树
- 关于Javascript所隐藏的小知识
- Glide 入门到精通之十八——Module 实例:用自定义尺寸优化加载的图片
- iOS开发编码建议与编程经验(持续更新中)
- 傅里叶分析之掐死教程(一)
- NSNotificationCenter--消息机制
- android 数据传递——实例化对象调用方法
- linux下I2C驱动架构全面分析
- Android Studio 的安装和配置篇(Windows篇)
- zygote启动过程分析
- jvm的参数查询列表
- 求1000阶乘中最后0的个数
- SVM-7-SMO(序列最小优化算法)
- 技术网站