iOS Developer Library — Prerelease

Developer

EventKit UI Framework Reference EKEventViewController Class Reference

Options
Deployment Target:

On This Page
Language:

EKEventViewController

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.

  • The event this view controller displays to the user.

    Declaration

    Swift

    var event: EKEvent

    Objective-C

    @property(nonatomic, retain, nonnull) EKEvent *event

    Discussion

    This property must be set before the view is displayed.

    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.

    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.

    Availability

    Available in iOS 4.0 and later.

    Not available in app extensions.