iOS: NSNotificationCenter的方法addObserverForName:object:queue:usingBlock:
来源:互联网 发布:pc客户端制作软件 编辑:程序博客网 时间:2024/05/12 11:13
- (id)addObserverForName:(NSString *)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *))block
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
self.localeChangeObserver = [center addObserverForName:NSCurrentLocaleDidChangeNotification object:nil
queue:mainQueue usingBlock:^(NSNotification *note) {
NSLog(@"The user's locale changed to: %@", [[NSLocale currentLocale] localeIdentifier]);
}];
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center removeObserver:self.localeChangeObserver];
- iOS: NSNotificationCenter的方法addObserverForName:object:queue:usingBlock:
- addObserverForName:object:queue:usingBlock:
- NSNotificationCenter addObserverForName 的释放
- iOS: NSNotificationCenter的方法postNotificationName:object:
- iOS: NSNotificationCenter的方法postNotificationName:object:userInfo:
- iOS: NSNotificationCenter的方法removeObserver:name:object:
- iOS: NSNotificationCenter的方法addObserver:selector:name:object:
- NSNotificationCenter中的addObserverForName
- NSNotificationCenter 中的addObserver和addObserverForName的释放问题。
- NSNotificationCenter 中的addObserver和addObserverForName的释放问题。
- iOS: NSArray的数组enumerateObjectsWithOptions:usingBlock:
- iOS: NSNotificationCenter的方法defaultCenter
- iOS: NSNotificationCenter的方法postNotification:
- iOS: NSNotificationCenter的方法removeObserver:
- iOS: NSNotificationCenter的方法removeObserver:
- IOS NSNotificationCenter 的坑
- IOS的NSNotificationCenter
- iOS-NSNotificationCenter的应用
- HDOJ1730[SG博弈]
- vs2010 未能将脚本调试器附加到计算机上的进程。已附加了一个调试器
- 双指针移动
- Tomcat学习笔记(一)
- 索骥馆-OFFICE系列之《北风网Excel高端应用培训:多条件约束报表自动统计系统分析与制作》共4章更新完
- iOS: NSNotificationCenter的方法addObserverForName:object:queue:usingBlock:
- ubuntu 没有显示器 vnc登陆 分辨率设置
- VS2010+Opencv-2.4.0的配置攻略 & Win7x64+VS2012+OpenCV2.4.3+CMake2.8.10+TBB41重编译OpenCV
- java正则表达式
- 工作零散记忆_002
- hdu 3992(AC自动机 + 高斯消元 + 求期望(好题))
- 三角形外接圆圆心公式
- 三屏版知识竞赛类软件的开发需求分析及技术构思
- Node.js操作mongodb数据库