How to know which reminder is updated in EKEventStoreChangedNotification

核能气质少年 提交于 2019-12-13 05:47:20

问题


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.
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? what if the user modified title of a reminder of some future date?


回答1:


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.

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.

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.



来源:https://stackoverflow.com/questions/23821021/how-to-know-which-reminder-is-updated-in-ekeventstorechangednotification

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!