iOS Developer Library

Developer

EventKitUI Framework Reference EKEventViewController Class Reference

Options
Deployment Target:

On This Page
Language:

EKEventViewController

Inheritance


Import Statement


Swift

import EventKitUI

Objective-C

@import EventKitUI;

Availability


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

An EKEventViewController object displays the details of a calendar event. You can set whether users are allowed to edit the event. If the event is an invitation, where the organizer is not the user, you can set whether a calendar preview is shown.

You need to assign a delegate to an EKEventViewController object to receive a notification when the view controller should be closed. The delegate must conform to the EKEventViewDelegate protocol.

  • event event Property

    The event this view controller displays to the user.

    Declaration

    Swift

    var event: EKEvent!

    Objective-C

    @property(nonatomic, retain) EKEvent *event

    Discussion

    This property must be set before the view is displayed.

    Import Statement

    Objective-C

    @import EventKitUI;

    Swift

    import EventKitUI

    Availability

    Available in iOS 4.0 and later.

    Not available in app extensions.

  • A Boolean value that determines whether the user can view the event in a calendar day preview.

    Declaration

    Swift

    var allowsCalendarPreview: Bool

    Objective-C

    @property(nonatomic) BOOL allowsCalendarPreview

    Discussion

    If the event is an invitation and this property is YEStrue, then a table cell appears allowing the user to preview the event along with other events on the same day. If NOfalse (the default), the calendar day preview does not appear. This property applies only to invitations.

    Import Statement

    Objective-C

    @import EventKitUI;

    Swift

    import EventKitUI

    Availability

    Available in iOS 4.0 and later.

    Not available in app extensions.

  • A Boolean value that determines whether the user is allowed to edit the event.

    Declaration

    Swift

    var allowsEditing: Bool

    Objective-C

    @property(nonatomic) BOOL allowsEditing

    Discussion

    If NOfalse (the default), the event is not editable. If YEStrue, the Edit button appears and the user is allowed to change properties of the event. This property applies only to events in an editable calendar that were created by the user. For example, it doesn’t apply to invitations sent by another user.

    Import Statement

    Objective-C

    @import EventKitUI;

    Swift

    import EventKitUI

    Availability

    Available in iOS 4.0 and later.

    Not available in app extensions.

  • delegate delegate Property

    The event view controller’s delegate.

    Declaration

    Swift

    weak var delegate: EKEventViewDelegate!

    Objective-C

    @property(nonatomic, weak) id< EKEventViewDelegate > delegate

    Import Statement

    Objective-C

    @import EventKitUI;

    Swift

    import EventKitUI

    Availability

    Available in iOS 4.2 and later.

    Not available in app extensions.