0

I have problem with timer reset. How to rest the timer to start counting for notification, which means 200 second delay before the last button pressed?

- (IBAction)buttonPressed:(id)sender {
    UILocalNotification *localNotification = [[UILocalNotification alloc] init];
    localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:200];
    localNotification.soundName = UILocalNotificationDefaultSoundName;
    localNotification.alertBody = @" More Quiz ";
    localNotification.timeZone = [NSTimeZone defaultTimeZone];

    [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
}
rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

1

You don't. Just call cancelLocalNotification: and schedule a new one.

matt
  • 515,959
  • 87
  • 875
  • 1,141