Class

EKObject

An abstract superclass for all Event Kit classes that have instances that are persistent.

Declaration

class EKObject : NSObject

Overview

EKObject provides fine control when saving and restoring property settings. For example, you can find out if a persistent object was modified locally and whether it needs to be saved. If the object has changed in the event store since it was fetched, you can refresh the local copy by keeping local changes or by removing local changes. You can also roll back the object to the state when it was first fetched.

Topics

Instance Properties

Saving and Restoring State

var hasChanges: Bool

Returns whether this object or any of the objects it contains has uncommitted changes.

isNew

Returns whether this object has ever been saved.

func refresh() -> Bool

Merges changes to this object with the latest saved values.

func reset()

Returns this object to its saved state.

func rollback()

Rolls back the property values of this object to its original state when it was first fetched.

Relationships

Inherits From

Conforms To

See Also

Common Objects

class EKCalendarItem

An abstract superclass for calendar events and reminders.

class EKSource

An abstract superclass that represents the account a calendar belongs to.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software