代码之家  ›  专栏  ›  技术社区  ›  RonLugge

为什么我会收到两个本地通知的警报?

  •  1
  • RonLugge  · 技术社区  · 14 年前

        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.");
    
    1 回复  |  直到 14 年前