| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/CalendarStore.framework |
| Availability | Available in Mac OS X v10.5 and later. |
| Companion guide | |
| Declared in | CalEvent.h |
| Related sample code |
A CalEvent object represents an event added to a calendar in iCal.
Use the event method to create a new event or use the CalCalendarStore eventsWithPredicate: method to fetch existing events. This method takes an NSPredicate object as the argument so you can build your own queries. Use the CalCalendarStore eventPredicateWithStartDate:endDate:calendars: method to create an NSPredicate object for common queries that you can pass to the eventsWithPredicate: method.
Use the properties in this class to get information about an event. For example, the attendees property is an array of CalAttendee objects representing the people who are invited to this event. The attendees property is read-only. Use the startDate and endDate properties to access the start and end date and time for an event.
If you retain event objects, you can observe the CalEventsChangedNotification notification to update event objects when they change. Event objects can be added, changed, or deleted locally and externally after you fetch them.
isAllDay property
location property
recurrenceRule property
startDate property
endDate property
attendees property
isDetached property
occurrence property
For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.
An array of invited guests or an empty array if there are no attendees. This property is read-only. (read-only)
@property(readonly) NSArray *attendees
CalEvent.hThe end date and time for this event.
@property(copy) NSDate *endDate
An error occurs if you attempt to save an event whose start date occurs after the end date.
CalEvent.hYES if this is an all day event; otherwise, NO.
@property BOOL isAllDay
CalEvent.hReturns whether or not an event is detached. This property is read-only. (read-only)
@property(readonly) BOOL isDetached
CalEvent.hA description of the location of this event.
@property(copy) NSString *location
CalEvent.hThe occurrence date of an event. This property is read-only. (read-only)
@property(readonly) NSDate *occurrence
CalEvent.hThe recurrence rule of an event.
@property(copy) CalRecurrenceRule *recurrenceRule
CalEvent.hThe start date and time for this event.
@property(copy) NSDate *startDate
An error occurs if you attempt to save an event whose start date occurs after the end date.
CalEvent.hCreates and returns a newly allocated CalEvent object.
+ (id)event
Use the saveEvent:span:error: method to save a new event to the iCal database.
CalEvent.hLast updated: 2009-03-04