nev*_*ing 5 iphone notifications cocoa-touch objective-c nsnotifications
我在视图控制器的init方法中设置了一个通知观察器,如下所示:
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(saveState)
name:UIApplicationWillResignActiveNotification
object:nil];
Run Code Online (Sandbox Code Playgroud)
removeObserver:name:object:这个通知的最佳地点在哪里?我现在用我的dealloc方法调用它,但想知道这是否会导致问题.
| 归档时间: |
|
| 查看次数: |
1341 次 |
| 最近记录: |