问题
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