I have a list of EKEvent's for the current day, and I want to filter out any that have been declined by the current user so that the list only contains
How can I do this? I can't find any examples anywhere, or any property on the event itself to store this info.
Here's some sample code, if that helps:
let eventStore = EKEventStore()
let today = Date()
let tomorrow = Calendar.current.date(byAdding: .day, value: 1, to: Date())!
let predicate = self.eventStore.predicateForEvents(withStart: today, end: tomorrow, calendars: nil)
let events = self.eventStore.events(matching: predicate)
// @TODO: Filter events by removing declined events.
you can get the infos via attendees and then participantStatus -> declined
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.