事件詳細信息應該存儲在哪裏?如何爲我不知道的特定事件發出警報。請幫助編寫代碼或爲此類示例提供鏈接。 提前感謝。如何爲特定日期製作活動?
4
A
回答
1
您可以在語法上爲將來的日期安排在iPhone的事件提醒。這是一個示例項目,它可以幫助您按照程序在iPhone中安排事件。檢查這個鏈接。 https://developer.apple.com/library/ios/#samplecode/SimpleEKDemo/Introduction/Intro.html
2
您可以使用本地通知,這裏有一些用於調度的示例代碼。
- (void)scheduleNotification {
UILocalNotification *notif = [[UILocalNotification alloc] init];
//notification for 3 days
notif.fireDate = [NSDate dateWithTimeInterval:60.0f*60.0f*24.0f*3.0f sinceDate:[NSDate date]];
notif.timeZone = [NSTimeZone defaultTimeZone];
notif.alertBody = @"We've missed you!";
notif.alertAction = @"PLAY";
notif.soundName = UILocalNotificationDefaultSoundName;
notif.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:notif];
}
相關問題
- 1. 如何獲取特定日期的日曆活動?
- 2. 鈦:如何在特定的日期時間安排活動
- 3. 指定活動的日期
- 4. 在特定日期獲取用戶活動的svn日誌
- 5. 如何獲得特定一週中特定日期的日期
- 6. 如何製作UIDatePicker顯示特定日期?
- 7. 如何爲活動記錄指定日期範圍?
- 8. 如何爲日期製作SQL循環?
- 9. 如何將選定日期值作爲參數傳遞給其他活動?
- 10. 使用當前日期作爲參考獲取特定日期
- 11. 如何爲圖表製作活動日誌
- 12. 如果是特定日期,請將日期設置爲待定
- 13. 如何爲特定日期的列安排自動增量
- 14. 如何繪製自定義動畫作爲活動背景
- 15. 如何制定日期範圍內的特定日期和時間
- 16. 獲取特定工作日的日期
- 17. Excel - 查找特定日期後特定日期的日期
- 18. 如何限制特定日期(星期一)的oracle作業時間間隔?
- 19. 特定日期
- 20. 特定日期
- 21. 特定日期
- 22. 特定日期
- 23. 如何按日期過濾buddypress活動?
- 24. 如何計算Facebook活動日期
- 25. 獲取日期爲特定日期是當天的日期後
- 26. 在Android 4+中列出特定日期的活動(ALL_DAY問題)
- 27. Google Calendar PHP按特定日期範圍檢索活動
- 28. 在特定日期和時間在Android中運行活動
- 29. 如何查找在特定日期交付給集成流的列表活動?
- 30. 將日曆設置爲特定日期?
您可以使用本地通知在特定日期觸發特定事件的警報。或者如果您不知道確切的日期,您可以使用APNS並從您的服務器發送推送通知。 – 2012-07-10 04:49:45