我正在使用UILocalNotifications
實現提醒應用程序,並且希望允許用戶設置重複模式。對於重複使用的模式NSDayCalenderUnit
,NSWeekCalendarUnit
,等等。如何從本地通知中獲取下一個啓動日期..?
我沒有看到LocalNotification
類中的任何屬性從通知中獲取下一個着火日期。
例
「{火日期=週五, 2013年9月6日,上午7點05分00秒印度標準時間,時區= 亞洲/加爾各答(GMT + 05:30)偏移19800,重複間隔= NSWeekCalendarUnit,重複計數爲 UILocalNotificationInfiniteRepeatCount,未來火日期=週五, 2013年9月6日,上午七時05分00秒印度標準時間,用戶信息= {\ n
kRemindMeNotificationDataKey = \「測試通知「; \ n}}」
任何人請幫助我從本地通知中獲取下一個啓動日期。
在此先感謝。
謝謝,其實我是新來的本地通知。我添加了一個星期重複模式的任務,重複間隔爲256.那麼,如何使用該間隔和fireDate創建下一個啓動日期。 – Karthik
fireDate:2013-09-06 13:34:00 +0000 repeatInterval:16(NSDayCalendarUnit) 而我得到了0001-01-05 18:06:32 +0000而不是2013-09-07 13:34: 00 +0000 – Karthik
您不需要創建下一個啓動日期。在重複模式下,它會使用repeatInterval中的NSCalendarUnit自動創建下一個啓動日期。我寫的答案是讓你知道你是否明確地需要它。否則爲發射LocalNotifications你不需要給它另一個fireDate在重複模式的情況下 –