How to accept/decline EKEvent invitation?

好久不见. 提交于 2019-11-29 07:08:20

To allow the user to create, edit, or delete events, use the EKEventEditViewDelegate protocol.

let eventController = EKEventViewController()
guard let eventWithIdentifier = MeetingsFetcher.eventStoreClass.event(withIdentifier: meeting.UUID) else {
                return nil
            }
eventController.delegate = self
eventController.event = eventWithIdentifier
eventController.editViewDelegate = self
...

CalendarViewController class must conform to the EKEventEditViewDelegate protocol and must implement the eventEditViewController method to dismiss the modal view controller as shown below:

func eventEditViewController(_ controller: EKEventEditViewController, 
             didCompleteWith action: EKEventEditViewAction) {

    switch (action) {
        case EKEventEditViewActionCanceled:
        case EKEventEditViewActionSaved:
        ...
    }

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