我收到以下通知的两个提醒,我不能为我的生活找出原因。代码似乎只被调用一次,但App:didReceiveLocalNotification被调用两次。我无法弄明白为什么!
NSLog(@"Configuring notifications time is up.");
noTimeLeft=[[UILocalNotification alloc]init];
noTimeLeft.fireDate=meterEndTime;
noTimeLeft.alertBody=@"Your parking meter has expired!";
noTimeLeft.alertAction=@"Go to meter";
noTimeLeft.userInfo=[NSDictionary dictionaryWithObject:self.meterEndTime forKey:@"NSDate"];
[[UIApplication sharedApplication] scheduleLocalNotification:noTimeLeft];
NSLog(@"Configuring notifications finished time is up.");
答案 0 :(得分:3)