IOS中NSNotification使用笔记
来源:互联网 发布:oracle关闭数据库命令 编辑:程序博客网 时间:2024/05/16 04:28
1 基本用法
添加观察(可能很多页面)
[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(changeIntlCode:)name:NOTIFICATION_SUCCESS_SELECT_INTLCODEobject:nil];
发出通知(可能只有一个页面)
[[NSNotificationCenterdefaultCenter] postNotificationName:NOTIFICATION_SUCCESS_SELECT_INTLCODEobject:niluserInfo:[NSDictionarydictionaryWithObject:model forKey:@"selectedIntlCodeModel"]];
在 dealloc中移除监听
[[NSNotificationCenter defaultCenter] removeObserver:self name:NOTIFICATION_SUCCESS_SELECT_INTLCODE object:nil];
0 1
- 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 通知的使用
- C、 C++遍历文件夹,删除文件夹
- ios----全面的文件管理操作讲解
- Codeforces Round #250 (Div. 2)——The Child and Set
- 获取本地设备IP地址
- linux shell学习
- IOS中NSNotification使用笔记
- 直接初始化与复制初始化的区别
- UIView转UIImage
- Asp.net C# Json 数据的读取方式
- 两个顺序表首尾相接(合并)的方法
- Linux下监控内存与CPU占用并保存到文件
- here document
- kfyjrdegts
- Cannot find executable for CFBundle "CertUIFramework.axbundle"错误方法