简体   繁体   English

如何知道EKEventStoreChangedNotification中的哪个提醒已更新

[英]How to know which reminder is updated in EKEventStoreChangedNotification

I am integrating iOS reminder app in my application, when i receive EKEventStoreChangedNotification how to know which particular reminder is modified or do I need to fetch all the reminders and update in my application. 当我收到EKEventStoreChangedNotification时,如何将iOS提醒应用程序集成到我的应用程序中,如何知道哪个特定的提醒已被修改,或者我需要在应用程序中获取所有提醒并进行更新。
In the documentation it is written as "you should refetch your current date range of events whenever you receive an EKEventStoreChangedNotification notification" what is current date range? 在文档中,其写为"you should refetch your current date range of events whenever you receive an EKEventStoreChangedNotification notification"什么是当前日期范围? what if the user modified title of a reminder of some future date? 如果用户修改了某个将来日期的提醒标题怎么办?

No, the EKEventStoreChangedNotification notification does not contain any data that allows you to detect exactly what was changed - it is simply posted whenever anything is the database is updated. 不,EKEventStoreChangedNotification通知不包含任何数据,可让您准确地检测到已更改的内容-只要对数据库进行了任何更新,它都将被简单地发布。

Also, in my experience, this event can fire several times in a row, so it is worth coalescing these into a single UI update for your app, for example by using a timer to update your UI a short time after the last change notification was received. 另外,根据我的经验,此事件可以连续触发多次,因此值得将这些事件合并到您的应用的单个UI更新中,例如,在上次更改通知发布后不久,使用计时器更新您的UI接收。

When the documentation states 'you should refetch your current date range of events..', it simply means that if your UI is showing say a month view of events, you should re-request this date range from the event store as you don't know exactly what has changed. 当文档中指出“您应该重新获取事件的当前日期范围..”时,仅表示如果您的用户界面显示事件的月份视图,则您应该从事件存储中重新请求该日期范围。不知道到底发生了什么变化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何知道在swift 4中实时firebase的childChanged eventtype中更新了哪个子子项 - How to know which subchild is updated in childChanged eventtype of realtime firebase in swift 4 如何检测事件存储更改以及更改的内容? 来自EKEventStoreChangedNotification - How to detect event store changes and what is change? From EKEventStoreChangedNotification EKEventStoreChangedNotification不触发 - EKEventStoreChangedNotification not firing 如何跟踪保存在iPhone或iPad中的提醒? - how to keep track of reminder which is saved in iphone or ipad? 有没有办法知道在使用Realm Notifications时更新或创建了哪个实例? - Is there a way to know which instance was updated or created when using Realm Notifications? Reminders应用程序如何知道仅在提醒当天跟踪我的位置? - How does the Reminders app know to only track my location on the day of the reminder? 如何知道Realm对象是否已成功更新? - How to know whether a Realm object was successfully updated? 如何在iPhone日历上创建提醒和存储提醒 - How to create a reminder and store reminder on iPhone Calender 如何制作提醒通知? - How to make a Reminder notification? 处理EKEventStoreChangedNotification通知 - Handling EKEventStoreChangedNotification notification
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM