çalışan yerel bildirim iptal edin. Sonuçta, ben kendi çözüm geldi ama görünüşe çalışmıyor. Ben bütün planlanan bildirimleri ile bir tableView var .... H dosyadadeğil ben soruları ve cevapları "Bir yerel bildirim iptal Nasıl" Tüm okuma Günümün yarısını geçirdim
Ben M dosyada sonra
@property (strong, nonatomic) UILocalNotification *theNotification;
ve var: Ben Tamam" tıklarsanız
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSArray *notificationArray = [[UIApplication sharedApplication] scheduledLocalNotifications];
theNotification = [notificationArray objectAtIndex:indexPath.row];
NSLog(@"Notification to cancel: %@", [theNotification description]);
// NSLOG Perfectly describes the notification to be cancelled. But then It will give me "unrecognized selector"
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Local Reminder"
message:@"Cancel local reminder ?"
delegate:self
cancelButtonTitle:@"No"
otherButtonTitles:@"Yes", nil];
[alertView show];
[alertView release];
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
NSLog(@"Cancel");
}else{
NSLog(@"Ok");
[[UIApplication sharedApplication] cancelLocalNotification:theNotification];
}
}
"Ben olsun: 2012-02-04 03: 34: 48,806 Üçüncü testi [8921: 207] - [__ NSCFType encodeWithCoder:]: tanınmayan seçici 0x890ae90 Programı sinyali alınan örneğine gönderilen "SIGABRT".
Tamamen bildirim saptayabilirseniz
neden bana vermek gelmez iptal edilecek? Benim app
Ben 1 bir yol bulmaya çalışıyordu. Cevabınız tamamen geçerli, daha iyi bir görsel sonuç için biraz daha çalışmak zorunda kaldım. Cevabınız için teşekkürler. Kabul edip oy vereceğim. – Farini
Bunun sadece _scheduled_ bildirimleri için çalıştığını unutmayın; presentLocalNotificationNow: ile sunulan bir bildirimi iptal edemezsiniz. Bu sadece anlamaya bir yıl sürdü! –
@Farini daha iyi hale getirmek için cevabımı düzenlemekte çekinmeyin :) – Shmidt