[英]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.