EKCalendarItem Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/EventKit.framework |
| Availability | Available in iOS 5.0 and later. |
| Companion guide | |
| Declared in | EKCalendarItem.h |
Overview
The EKCalendarItem class is a an abstract superclass for calendar events and reminders. This class provides common properties and methods for accessing properties of calendar items such as the ability to set the calendar, title, and location as well as support for attaching notes, displaying attendees, setting multiple alarms, and specifying recurrence rules.
Tasks
Accessing Calendar Items
-
calendarItemIdentifierproperty -
calendarItemExternalIdentifierproperty -
UUIDproperty Deprecated in iOS 6.0
Accessing Calendar Item Properties
-
calendarproperty -
titleproperty -
locationproperty -
creationDateproperty -
lastModifiedDateproperty -
timeZoneproperty -
URLproperty
Attaching Notes
Displaying Attendees
-
hasAttendeesproperty -
attendeesproperty
Adding and Removing Alarms
-
hasAlarmsproperty -
– addAlarm: -
– removeAlarm: -
alarmsproperty
Setting Recurrence Rules
-
hasRecurrenceRulesproperty -
– addRecurrenceRule: -
– removeRecurrenceRule: -
recurrenceRulesproperty
Properties
alarms
The alarms associated with the calendar item, as an array of EKAlarm objects.
Discussion
This property is nil if the calendar item has no alarms.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
EKCalendarItem.hattendees
The attendees associated with the calendar item, as an array of EKParticipant objects. (read-only)
Discussion
This property is read-only; it is not possible to add attendees with Event Kit. This property is nil if the calendar item has no attendees.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
EKCalendarItem.hcalendar
The calendar for the calendar item.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.hcalendarItemExternalIdentifier
The calendar item’s external identifier as provided by the calendar server. (read-only)
Discussion
This identifier allows you to access the same event or reminder across multiple devices.
There are some cases where duplicate copies of a calendar item can exist in the same database:
A calendar item was imported from an ICS file into multiple calendars
An event was created in a calendar shared with the user and the user was also invited to the event
The user is a delegate of a calendar that also has this event
A subscribed calendar was added to multiple accounts
In such cases, you should choose between calendar items based on other factors, such as the calendar or source.
Recurring event identifiers are the same for all occurrences. If you wish to differentiate between occurrences, you may want to use the start date.
For Exchange servers, the identifier is different between iOS and OS X and different between devices for reminders.
Availability
- Available in iOS 6.0 and later.
Declared In
EKCalendarItem.hcalendarItemIdentifier
The calendar item’s unique identifier. (read-only)
Discussion
This property is set when the calendar item is created and can be used as a local identifier. Use calendarItemWithIdentifier: to look up the item by this value.
A full sync with the calendar will lose this identifier. You should have a plan for dealing with a calendar whose identifier is no longer fetch-able by caching its other properties.
Availability
- Available in iOS 6.0 and later.
See Also
Declared In
EKCalendarItem.hcreationDate
The date that this calendar item was created. (read-only)
Discussion
If nil, this property was not set or was synced in this state.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
EKCalendarItem.hhasAlarms
A Boolean value that indicates whether the calendar item has alarms. (read-only)
Discussion
If YES, the calendar item has alarms; otherwise it does not.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
EKCalendarItem.hhasAttendees
A Boolean value that indicates whether the calendar item has attendees. (read-only)
Discussion
If YES, the calendar item has attendees; otherwise it does not.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
EKCalendarItem.hhasNotes
A Boolean value that indicates whether the calendar item has notes. (read-only)
Discussion
If YES, the calendar item has notes; otherwise it does not.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
EKCalendarItem.hhasRecurrenceRules
A Boolean value that indicates whether the calendar item has recurrence rules. (read-only)
Discussion
If YES, the calendar item has recurrence rules; otherwise it does not.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.hlastModifiedDate
The date that the calendar item was last modified. (read-only)
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
EKCalendarItem.hlocation
The location associated with the calendar item.
Discussion
This property is nil if the calendar item has no location.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.hnotes
The notes associated with the calendar item.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
EKCalendarItem.hrecurrenceRules
The recurrence rules for the calendar item.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.htimeZone
The time zone for the calendar item.
Discussion
If nil, the calendar item is a floating event. A floating event is not tied to a particular time zone. It occurs at a given time regardless of the time zone — for example, “lunch at noon.” The start and end times of a floating event should be set as if they were in the system time zone.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.htitle
The title for the calendar item.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.hURL
The URL for the calendar item.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.hInstance Methods
addAlarm:
Adds an alarm to the receiver.
Parameters
- alarm
The alarm to be added.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.haddRecurrenceRule:
Adds a recurrence rule to the recurrence rule array.
Parameters
- rule
The rule to be added to
recurrenceRules.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.hremoveAlarm:
Removes an alarm from the calendar item.
Parameters
- alarm
The alarm to be removed.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.hremoveRecurrenceRule:
Removes a recurrence rule from the recurrence rule array.
Parameters
- rule
The rule to be removed from
recurrenceRules.
Availability
- Available in iOS 5.0 and later.
Declared In
EKCalendarItem.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-07-17)