1
我收到兩條關於下面通知的警報,但我不知道爲什麼。該代碼似乎只被調用一次,但App:didReceiveLocalNotification被調用兩次。我無法弄清楚爲什麼!爲什麼我會收到有關預定本地通知的兩個警報?
NSLog(@"Configuring notifications time is up.");
noTimeLeft=[[UILocalNotification alloc]init];
noTimeLeft.fireDate=meterEndTime;
[email protected]"Your parking meter has expired!";
[email protected]"Go to meter";
noTimeLeft.userInfo=[NSDictionary dictionaryWithObject:self.meterEndTime forKey:@"NSDate"];
[[UIApplication sharedApplication] scheduleLocalNotification:noTimeLeft];
NSLog(@"Configuring notifications finished time is up.");