iOS 开发 NSNotificationCenter
来源:互联网 发布:电脑软件助手 编辑:程序博客网 时间:2024/05/17 23:46
NSNotificationCenter:
/**
* @brief 添加观察者
* @param observer 观察者(接受通知的对象)
* @param aSelector 接受通知之后执行的方法
* @param aName 通知的名称,如果为 nil 则接收所有通知
* @param anObject 接收什么对象的通知,如果为 nil 则接收所有通知
* @return void
*/
- (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullableNSNotificationName)aName object:(nullableid)anObject;
/**
* @brief 发送通知
* @param aName 发送通知的名称
* @param anObject 发送通知的对象,可以设为nil,也可以在这里面进行通知传值
* @param aUserInfo 用户信息,是个NSDictionary类型,可以设置为nil,可以在这里面进行通知传值
* @return void
*/
- (void)postNotificationName:(NSNotificationName)aName object:(nullableid)anObject userInfo:(nullableNSDictionary *)aUserInfo;
/**
* @brief 移除通知
* @param observer 移除的观察者
* @param aName 移除的通知名称
* @param anObject 移除的通知对象
* @return void
*/
- (void)removeObserver:(id)observer name:(nullableNSNotificationName)aName object:(nullableid)anObject;
// 注册观察者之后,如果销毁观察者注册对象,则要销毁通知,在
- (void)dealloc {
}
实现。
- 【深入浅出ios开发】NSNotificationCenter
- 【深入浅出ios开发】NSNotificationCenter
- iOS开发 使用NSNotificationCenter
- iOS 开发 NSNotificationCenter
- iOS开发之NSNotificationCenter详解
- iOS开发 - 通知中心(NSNotificationCenter)
- ios开发--注册通知NSNotificationCenter
- iOS开发 - 通知中心(NSNotificationCenter)
- iOS 本地通知NSNotificationcenter --- iOS 开发
- IOS开发数据传递机制之NSNotificationCenter
- ios开发——NSNotificationCenter (通知中心)
- IOS开发笔记-消息通信机制NSNotificationCenter
- iOS开发之NSNotificationCenter的使用
- [IOS开发] NSNotificationCenter消息通信机制
- iOS开发之通知中心(NSNotificationCenter)
- iOS开发之通知中心(NSNotificationCenter)
- iOS开发之通知中心(NSNotificationCenter)«
- IOS开发基础篇--NSNotificationCenter使用小结
- C++笔记 类型转换,IO,STL标准模板库
- 4、Java递归
- Trafodion 安装之HBase配置优化
- 【C#】简单解决PathTooLong的Exception
- 02_Qt的qDegug函数和QDebug类
- iOS 开发 NSNotificationCenter
- mysql笔记 (早前的,很乱)
- oracle11g的卸载
- 【前端】使用JS替换URL的参数(代码案例)
- 收起键盘的两种方法
- MySQL的连接断开
- 【算法题】预定酒店
- Rxjava定时器异常循环
- 用webgl来绘制二维点云吧