swift - 更改了哪个日历(使用 EKEventStoreChangedNotification?)

标签 swift ekeventstore

我想了解有关 EKEventStoreChangedNotification 被触发时发生的变化的更多详细信息。我有很多日历,如果其中一个提醒/条目已更改,我不想重新加载所有日历。 (理想情况下,我可以只重新加载那个日历。或者更好的是,只需在我本地存储的数据结构中重新添加或删除那个提醒。)

我看到了下面的帖子,但没有得到回答,我的问题更笼统:是否有任何机制(使用 EKEventStoreChangedNotification 或其他东西)来获取有关事件存储如何更改的更多详细信息?

How to know which reminder is updated in EKEventStoreChangedNotification

谢谢,丹尼尔

最佳答案

不幸的是,文档非常直白:

Posted whenever changes are made to the Calendar database, including adding, removing, and changing events or reminders. Individual changes are not described.

它继续指出,一旦发布该通知,您的所有事件都将被视为过时,直到您重新获取它们。

因此,除非您想维护一个静态事件数据库,并在每次通知发布时都比较它们,否则您就不走运了。

关于swift - 更改了哪个日历(使用 EKEventStoreChangedNotification?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30794740/

相关文章:

xcode - 如何从我在 Swift 项目中的测试访问我的应用程序代码?

ios - EKEventStore 与 iOS Widget 错误 : [EventKit] Client tried to open too many connections to calaccessd. 拒绝打开另一个

ios - 对日历守护程序的谓词调用失败 : Error Domain=EKCADErrorDomain Code=1013

ios - 查看 EkReminder 重复频率的最佳方式?

swift - swift 中的类到协议(protocol)对话

ios - CocoaLumberjack Swift - 检查日志级别是否包含 .verbose

swift - UIBarButtonItem 没有启动选择器操作

ios - Facebook SDK 自动改变高度

ios6 - EKEvents/EKReminders 已设置但未显示在日历上