如何以编程方式访问日历事件的默认警报时间?

时间:2013-07-09 01:27:16

标签: ios cocoa-touch eventkit

在最近的iOS版本中,用户可以选择将用于所有新创建事件的默认提醒时间(转到Settings --> Mail, Contacts, Calendars --> Calendars / Default Alert Times,请参阅http://www.imore.com/how-edit-calendar-defaults-alerts-and-sync-settings-iphone-and-ipad#calendar-alerts)。

我正在查看EventKit文档,但找不到以编程方式读取此设置的方法。我尝试使用[EKEvent eventWithEventStore:]创建一个虚拟事件并读取其alarms属性,但在保存事件之前它似乎没有默认警报设置。当然,我可以保存事件,阅读其alarms属性,然后立即将其删除,但这似乎是一个丑陋的解决方案。

从代码访问此设置的正确方法是什么?

0 个答案:

没有答案