Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

CalCalendarItem Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/CalendarStore.framework
Availability
Available in Mac OS X v10.5 and later.
Companion guide
Declared in
CalCalendarItem.h

Overview

CalCalendarItem is an abstract superclass for CalEvent and CalTask objects. It provides common properties for its subclasses such as the title and associated calendar object of a calendar item. You do not create CalCalendarItem objects directly. Use the CalCalendarStore methods to fetch events and tasks. When you have a CalCalendarItem object you can add and remove alarms using the methods listed in “Setting Alarms.”

Tasks

Getting and Setting Properties

Setting Alarms

Properties

For more about Objective-C properties, see “Properties” in The Objective-C 2.0 Programming Language.

alarms

An array containing the calendar item’s alarm objects—an array of CalAlarm objects.

@property(copy) NSArray *alarms;

Availability
Declared In
CalCalendarItem.h

calendar

The associated calendar object for the calendar item.

@property(retain) CalCalendar *calendar;

Discussion

An error occurs if you attempt to save a calendar item without first setting the calendar property.

Availability
Declared In
CalCalendarItem.h

dateStamp

The date the calendar item was last modified (not the same as the date is was last synced). This property is read-only.

@property(readonly) NSDate *dateStamp;

Availability
Declared In
CalCalendarItem.h

notes

The notes about the calendar item.

@property(copy) NSString *notes;

Availability
Declared In
CalCalendarItem.h

title

The title of the calendar item.

@property(copy) NSString *title;

Availability
Declared In
CalCalendarItem.h

uid

The calendar item’s unique identifier. This property is read-only.

@property(readonly) NSString *uid;

Availability
Declared In
CalCalendarItem.h

url

The URL for the calendar item.

@property(copy) NSURL *url;

Availability
Declared In
CalCalendarItem.h

Instance Methods

addAlarm:

Adds an alarm to the receiver.

- (void)addAlarm:(CalAlarm *)alarm

Parameters
alarm

The alarm to add.

Availability
Declared In
CalCalendarItem.h

addAlarms:

Adds the alarms contained in an array to the receiver.

- (void)addAlarms:(NSArray *)alarms

Parameters
alarms

An array of CalAlarm objects to add.

Availability
Declared In
CalCalendarItem.h

hasAlarm

Returns whether or not the receiver has an alarm.

- (BOOL)hasAlarm

Return Value

YES if the receiver has an alarm; otherwise, NO.

Availability
Declared In
CalCalendarItem.h

nextAlarmDate

Returns the date of the next alarm.

- (NSDate *)nextAlarmDate

Return Value

The date the next alarm triggers.

Availability
Declared In
CalCalendarItem.h

removeAlarm:

Removes the specified alarm from the receiver.

- (void)removeAlarm:(CalAlarm *)alarm

Parameters
alarm

The alarm to remove.

Availability
Declared In
CalCalendarItem.h

removeAlarms:

Removes the alarms contained in an array from the receiver.

- (void)removeAlarms:(NSArray *)alarms

Parameters
alarms

An array of CalAlarm objects to remove.

Availability
Declared In
CalCalendarItem.h

Next Page > Hide TOC


Last updated: 2007-07-08




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice