我正在使用 UILocalNotifications
实现提醒应用程序,并希望允许用户设置重复模式 . 对于重复模式使用 NSDayCalenderUnit
, NSWeekCalendarUnit
等 .
我没有在 LocalNotification
类中看到任何属性从通知中获取下一个开火日期 .
Example
“{fire date = 2013年9月6日星期五,印度标准时间上午7:05:00,时区=亚洲/加尔各答(GMT 05:30)偏移19800,重复间隔= NSWeekCalendarUnit,重复计数= UILocalNotificationInfiniteRepeatCount,下一次火灾date = 2013年9月6日星期五,上午7:05:00印度标准时间,用户信息= {\ n kRemindMeNotificationDataKey = \“测试通知\”; \ n}}“
请帮助我从本地通知中获取下一个开火日期 .
提前致谢 .
2 回答
您可以使用
UILocalNotification
中的两个属性:fireDate
repeatInterval
基于这两个属性创建NSDate .
试试这段代码