이 방법을 시도 ...
있는 NSDictionary * DICT = [NSDictionary에 dictionaryWithObject : "개체"forKey @ : "키"@]
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.fireDate = Pre_date;
localNotif.timeZone = [NSTimeZone defaultTimeZone];
// Notification details
localNotif.alertBody = [txtRemindetText text];
// Set the action button
localNotif.alertAction = @"View";
localNotif.userInfo=dict;
localNotif.soundName = UILocalNotificationDefaultSoundName;
// Schedule the notification
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
AppDelegate.m
- (void)application:(UIApplication *)app didReceiveLocalNotification:(UILocalNotification *)notif {
// Handle the notificaton when the app is running
NSLog(@"Recieved Notification %@",notif);
NSLog(@"%@",notif.userInfo);
NSLog(@"%@",[notif.userInfo objectForKey:@"YOUR KEY"];
}
당신이 어떤 문제가 있다면 알려주세요.
알림의 'Notif.userinfo' 속성을 사용하십시오. 저장 개체에 대한 사전을 가져옵니다. Notif.userinfo에 의해 통지 수신 방법에서이를 얻을 수 있습니다. – user1673099