user3424507
user3424507

Reputation: 1

Local Notification timer reset

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];
}

Upvotes: 0

Views: 162

Answers (1)

matt
matt

Reputation: 534893

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

Upvotes: 1

Related Questions