Is it possible to reorder EKReminders in EKCalendar of type reminders? In native Reminders app it is possible, but I can't seem to find this option in the API.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
So,
EKCalendarItem
objects havecalendarItemExternalIdentifier
which is unique to the event across devices. You can use this to your advantage for this ordering strategy.Every time you fetch events from the calendar API, keep track of their
calendarItemExternalIdentifier
in whatever persistence store you choose (Core Data, SQLite, Property Lists, etc...) and also keep track of it's order.So if you used Core Data you might have an entity with two attributes,
calendarItemExternalIdentifier
andorder
. Now whenever you present the events to the user, query the persistent store for order of each event and display accordingly. If new events come in, find the highest order and increment from there. When the user re-orders, set the order key for the appropriate record in your persistent store.