iOS NSNotification的使用
来源:互联网 发布:淘宝开店卖什么挣钱 编辑:程序博客网 时间:2024/05/11 01:28
先在消息中心注册通知
[[NSNotificationCenter defaultCenter] addObserver:observer selector:@selector(”要执行的函数“) name:@"NAME"(需要观察的对象) object:nil];
然后发送通知
[[NSNotificationCenter defaultCenter] postNotificationName:@"NAME" object:self];
需要注意的是注册通知的NAME与发送通知的NAME要相同,才能接收到对应的通知
0 0
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification的使用
- iOS NSNotification 通知的使用
- ios NSNotification通知的使用
- iOS NSNotification的使用 通知
- iOS NSNotification(通知)的使用
- iOS开发:NSNotification的使用
- iOS 通知的使用NSNotification的使用
- vc中dll导出导入简单教程
- 经纬度坐标转换为屏幕坐标
- ZBar 二维码扫描(自定义区域扫描)
- button
- 设计模式入门-策略模式(php版)
- iOS NSNotification的使用
- golang学习之安装环境
- JVM:加载、链接和初始化
- Linux命令总结(持续更新)
- php5.3以上自带php-fpm扩展无法关闭和重启的问题
- 用汉明距离进行图片相似度检测的Java实现
- 没有了SA密码,无法Windows集成身份登录,DBA怎么办?
- ArcGIS教程:分析对 3D 飞行路径和走廊的威胁(一)
- 思维导图の 近两日极为纠结——游戏服务器,选择何种技术方案?(Python + SWIG--RakNet + Lua)