我想知道是否有办法从先前设置的本地通知中获取剩余时间。
假设我做了这样的事情:
//Creating Notification
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.fireDate = someTime;
localNotif.alertBody = @"Your parking time will expire in 10 mins";
localNotif.alertAction = @"View";
localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
[localNotif release];
所以我完全关闭了我的应用程序。我重新打开它,我想显示一些消息,说明通知启动还剩多少时间。
提前致谢。