VMF_AddToCalendar_Activity

class VMF_AddToCalendar_Activity : VMF_Base_Activity
extension VMF_AddToCalendar_Activity: EKEventEditViewDelegate

We can present a custom activity, that allows the user to add the meeting to their calendar.

Base Class Overrides

  • The title string for this activity.

    Declaration

    Swift

    override var activityTitle: String? { get }
  • The template image for the activity line.

    Declaration

    Swift

    override var activityImage: UIImage? { get }
  • We have our own custom activity type.

    Declaration

    Swift

    override var activityType: UIActivity.ActivityType? { get }
  • We extract the event from the items, and return true.

    Declaration

    Swift

    override func canPerform(withActivityItems inActivityItems: [Any]) -> Bool

    Parameters

    inActivityItems

    The activity items (ignored).

  • This is the execution handler for the activity.

    Declaration

    Swift

    override func perform()

Instance Methods

  • This adds a reminder event for the next meeting start time.

    See more

    Declaration

    Swift

    func addReminderEvent()
  • This displays an alert, for when permission is denied, and allows access to the settings. This can be called from non-main threads.

    Declaration

    Swift

    func displayPermissionsAlert(header inHeader: String, body inBody: String)

    Parameters

    inHeader

    The header. This can be a lo9calization slug.

    inBody

    The message body. This can be a localization slug.

EKEventEditViewDelegate Conformance

  • Called when the event kit has completed with an action to add the reminder to the calendar.

    Declaration

    Swift

    func eventEditViewController(_ inController: EKEventEditViewController, didCompleteWith inAction: EKEventEditViewAction)

    Parameters

    inController

    The controller we’re talking about.

    inAction

    The even action that completed.