iOS Developer Library

Developer

EventKitUI Framework Reference EKEventEditViewController Class Reference

Options
Deployment Target:

On This Page
Language:

EKEventEditViewController

Conforms To


Import Statement


Swift

import EventKitUI

Objective-C

@import EventKitUI;

Availability


Available in iOS 4.0 and later.
Not available in app extensions.

An EKEventEditViewController object allows the user to create and edit a calendar event. You can use this class to create a new event or a partially constructed event. If the new event has no calendar, the default calendar is used. You should present this type of view controller modally.

  • The delegate that is notified when editing is done.

    Declaration

    Swift

    weak var editViewDelegate: EKEventEditViewDelegate!

    Objective-C

    @property(nonatomic, weak) id< EKEventEditViewDelegate > editViewDelegate

    Import Statement

    Objective-C

    @import EventKitUI;

    Swift

    import EventKitUI

    Availability

    Available in iOS 4.0 and later.

    Not available in app extensions.

  • event event Property

    The event the user creates or edits using this view controller.

    Declaration

    Swift

    var event: EKEvent!

    Objective-C

    @property(nonatomic, retain) EKEvent *event

    Discussion

    If nil, a new event is created and added to the specified event store. New events are added to the default calendar. An exception is raised if set to an event that is not in the specified event store.

    Import Statement

    Objective-C

    @import EventKitUI;

    Swift

    import EventKitUI

    Availability

    Available in iOS 4.0 and later.

    Not available in app extensions.

    See Also

    eventStore

  • The event store used to save the event.

    Declaration

    Swift

    var eventStore: EKEventStore!

    Objective-C

    @property(nonatomic, retain) EKEventStore *eventStore

    Discussion

    This property must be set before displaying the view.

    Import Statement

    Objective-C

    @import EventKitUI;

    Swift

    import EventKitUI

    Availability

    Available in iOS 4.0 and later.

    Not available in app extensions.

    See Also

    event

  • Ends the editing session discarding any changes to the event.

    Declaration

    Swift

    func cancelEditing()

    Objective-C

    - (void)cancelEditing

    Discussion

    This method is the programmatic equivalent of the user tapping the Cancel button. The delegate will not receive the eventEditViewController:didCompleteWithAction: message, so you must dismiss the controller after calling this method.

    Import Statement

    Objective-C

    @import EventKitUI;

    Swift

    import EventKitUI

    Availability

    Available in iOS 6.0 and later.

    Not available in app extensions.