設定バンドルには、複数選択オプションがあります。そのため、何かを選択すると、アプリは新しい値を受け取り、それを使用して UILocalNotification を起動する必要があります。私が試したことは、アプリを開いたときにのみ値を更新します。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(defaultsChanged:)
name:NSUserDefaultsDidChangeNotification
object:nil];
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
[[NSUserDefaults standardUserDefaults]synchronize];
}