NotificationCenter观察模式
2016-06-22 21:40
295 查看
主要方法:
NotificationCenter::getInstance()->addObserver(this, callfuncO_selector(jichen::getMsg), "test", nullptr);
NotificationCenter::getInstance()->postNotification("test",nullptr);//发送消息,调用方法
NotificationCenter::getInstance()->addObserver(this, callfuncO_selector(jichen::getMsg), "test", nullptr);
NotificationCenter::getInstance()->postNotification("test",nullptr);//发送消息,调用方法
void jichen::getMsg(Ref* sender) {//传递方法,无法传递数据 log("getMsg in jichen"); }
相关文章推荐
- java 基础知识问题集
- python yield send 一个容易犯错的地方
- leetcode No18. 4Sum
- Lightoj 1018 - Brush (IV)
- 怎样判断手机是不是正品
- faster-rcnn训练时出现error == cudaSuccess (30 vs. 0)
- 2 大型网站架构模式
- 从程序员到CTO的Java技术路线图
- django-BBS(1)
- 手机常用术语2
- 数组 题目
- php each
- 第十一周学习进度条
- 第十周学习进度条
- 手机常用术语1
- Eclipse项目导入Android Studio,.9图片报错解决办法
- 一、64位windows 安装mysql
- 【一天一道LeetCode】#98. Validate Binary Search Tree
- 【一天一道LeetCode】#98. Validate Binary Search Tree
- 第九周学习进度条