How to accept/decline EKEvent invitation?

前端 未结 1 1216
梦毁少年i
梦毁少年i 2020-12-17 18:55

I would like to allow my users to accept/decline a meeting invitation within my app.

I think what I need is to update somehow the EKParticipantStatus but it looks l

相关标签:
1条回答
  • 2020-12-17 19:22

    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:
            ...
        }
    
    }
    
    0 讨论(0)
提交回复
热议问题