Reputation: 1
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
Reputation: 534893
You don't. Just call cancelLocalNotification:
and schedule a new one.
Upvotes: 1