您的位置:首页 > 其它

NotificationCenter观察模式

2016-06-22 21:40 295 查看
主要方法:

NotificationCenter::getInstance()->addObserver(this, callfuncO_selector(jichen::getMsg), "test", nullptr);

NotificationCenter::getInstance()->postNotification("test",nullptr);//发送消息,调用方法
void jichen::getMsg(Ref* sender)
{//传递方法,无法传递数据
log("getMsg in jichen");
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: