【发布时间】:2011-05-03 20:31:48
【问题描述】:
我想知道是否有办法从之前设置的本地通知中获取剩余时间。
假设我做了这样的事情:
//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];
然后我完全关闭我的应用程序。我重新打开它,我想显示一些消息,说明通知启动还剩多少时间。
提前致谢。
【问题讨论】:
标签: iphone notifications push-notification uilocalnotification