IOS疯狂基础之NSNotificationCenter消息注册与撤销
2013-03-07 21:45
441 查看
注册:UIKeyboardWillShowNotification 每次发生该事件 则调用keyboardWillShow
[[NSNotificationCenter
defaultCenter]
addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification
object:nil];
撤销:
[[NSNotificationCenter
defaultCenter]
removeObserver:self
name:UIKeyboardWillShowNotification
object:nil ];
[[NSNotificationCenter
defaultCenter]
addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification
object:nil];
撤销:
[[NSNotificationCenter
defaultCenter]
removeObserver:self
name:UIKeyboardWillShowNotification
object:nil ];
相关文章推荐
- ios NSNotificationCenter消息注册与撤销
- iOS学习笔记之NSNotificationCenter(消息机制)
- IOS学习之NSNotificationCenter消息机制
- iOS基础——通知代理之NSNotificationCenter、Delegate
- iOS NSNotificationCenter消息注册与撤销【转】
- iOS开发之NSNotificationCenter(通知)的使用方法
- iOS: NSNotificationCenter的方法removeObserver:
- IOS注意之NSNotificationCenter
- iOS监听模式系列之NSNotificationCenter的简单使用
- iOS与Android对比学之NSNotificationCenter
- iOS监听模式系列之NSNotificationCenter的简单使用
- IOS开发数据传递机制之NSNotificationCenter
- iOS开发之NSNotificationCenter详解
- iOS高级面试之NSNotificationCenter是同步操作还是异步操作
- iOS通知:NSNotificationCenter
- iOS 关于NSNotificationCenter
- iOS开发之NSNotificationCenter(通知)的使用方法
- 【深入浅出ios开发】NSNotificationCenter
- xcode反汇编调试iOS模拟器程序(四)自动断点应用之NSNotificationCenter
- 关于NSNotificationCenter的注册和移除