简体   繁体   English

如何判断 EKEvent 实例是否被拒绝?

[英]How to tell if an EKEvent instance is declined or not?

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我有当天的 EKEvent 列表,我想过滤掉当前用户拒绝的任何内容,以便列表仅包含

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您可以通过参加者获取信息,然后参与者状态 -> 拒绝

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM