Class

EKEvent

A class that represents an event added to a calendar.

Declaration

class EKEvent : EKCalendarItem

Overview

Use the init(eventStore:) method to create a new event. Use the properties in the class to get and modify certain information about an event. Other properties, such as the event’s title and calendar, are inherited from the parent class EKCalendarItem.

Topics

Creating Events

init(eventStore: EKEventStore)

Creates and returns a new event belonging to a specified event store.

Scheduling Events

enum EKEventStatus

The event’s status.

enum EKEventAvailability

The event’s availability setting for scheduling purposes.

Comparing Events

func compareStartDate(with: EKEvent) -> ComparisonResult

Compares the start date of the receiving event with the start date of another event.

Accessing Event Properties

var eventIdentifier: String!

A unique identifier for the event.

var availability: EKEventAvailability

The availability setting for the event.

var startDate: Date!

The start date of the event.

var endDate: Date!

The end date for the event.

var isAllDay: Bool

A Boolean value that indicates whether the event is an all-day event.

var occurrenceDate: Date!

The original occurrence date of an event if it is part of a recurring series.

var isDetached: Bool

A Boolean value that indicates whether an event is a detached instance of a repeating event.

var organizer: EKParticipant?

The organizer associated with the event.

var status: EKEventStatus

The status of the event.

var birthdayPersonID: Int

The Address Book framework record identifier of the person for this birthday event.

Deprecated
var birthdayPersonUniqueID: String?

The Address Book framework record identifier of the person for this birthday event.

Deprecated

Refreshing Event Data

func refresh() -> Bool

Updates the event’s data with the current information in the Calendar database.

Relationships

Inherits From

Conforms To

See Also

Events and Reminders

Creating Events and Reminders

Create and modify events and reminders in a user's database.

Retrieving Events and Reminders

Fetch events and reminders from the Calendar database.

Updating with Notifications

Register to be notified about changes and keep your app up to date.

class EKReminder

A class that represents a reminder added to a calendar.