私の AppDelegate クラスは、以下のような特定の通知に登録されています
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applyThemeA:)
name:@"ThemeA"
object:nil];
}
そして、applyThemeAはそうします(あまりありません)
- (void)appleThemeA:(NSNotification*)notification {
NSLog(@"apply themeA");
}
に配置removeObserver
しapplicationWillTerminate
ていますが、それが良い方法かどうかはわかりません。
質問
このメソッドを配置するのに適した場所ですか。
私は自分が正しいやり方をしていることを確認したいだけです。質問が適切でない場合は、反対票を投じないでください。ありがとう