Mac OS X Reference Library Apple Developer Connection spyglass button

CalCalendar 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
CalCalendar.h
Related sample code

Overview

A CalCalendar object represents a calendar in iCal.

Use the calendar method to create a CalCalendar object directly, or use the CalCalendarStore calendars method to get an array of all the calendar objects. If you know the calendar UID, use the calendarWithUID: CalCalendarStore method to get the associated calendar object.

Use the properties in this class to get attributes about a calendar—for example, use the properties to get the title and color of a calendar. Use the eventsWithPredicate: and tasksWithPredicate: CalCalendarStore methods to fetch associated events and tasks.

If you retain CalCalendar objects, then register for the CalCalendarsChangedNotification notification.

Tasks

Creating Calendars

Getting Properties

Properties

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

color

The calendar’s color.

@property(copy) NSColor * color;
Availability
Declared In
CalCalendar.h

isEditable

A Boolean value indicating whether the calendar is editable or not.

@property(readonly) BOOL isEditable;
Discussion

Set to YES if the calendar is editable; otherwise, NO.

Availability
Declared In
CalCalendar.h

notes

Textual notes about the calendar.

@property(copy) NSString * notes;
Availability
Declared In
CalCalendar.h

title

The calendar’s title.

@property(copy) NSString * title;
Availability
Related Sample Code
Declared In
CalCalendar.h

type

The type of calendar.

@property(readonly) NSString * type;
Discussion

The value of this property is one of the constants described in “Calendar Types”.

Availability
Declared In
CalCalendar.h

uid

A unique identifier for the receiver.

@property(readonly) NSString * uid;
Availability
Declared In
CalCalendar.h

Class Methods

calendar

Creates and returns a new CalCalendar object.

+ (id)calendar

Return Value

A newly created and initialized CalCalendar object.

Availability
Related Sample Code
Declared In
CalCalendar.h

Constants

Calendar Types

The type of calendar.

extern NSString * const CalCalendarTypeBirthday;
extern NSString * const CalCalendarTypeCalDAV;
extern NSString * const CalCalendarTypeExchange;
extern NSString * const CalCalendarTypeIMAP;
extern NSString * const CalCalendarTypeLocal;
extern NSString * const CalCalendarTypeSubscription;
Constants
CalCalendarTypeBirthday

An birthday calendar maintained by Address Book.

Available in Mac OS X v10.5 and later.

Declared in CalCalendar.h.

CalCalendarTypeCalDAV

A CalDAV server calendar.

Available in Mac OS X v10.5 and later.

Declared in CalCalendar.h.

CalCalendarTypeExchange

An Exchange calendar.

Available in Mac OS X v10.6 and later.

Declared in CalCalendar.h.

CalCalendarTypeIMAP

An IMAP calendar.

Available in Mac OS X v10.5 and later.

Declared in CalCalendar.h.

CalCalendarTypeLocal

A local calendar that may be synced over .Mac.

Available in Mac OS X v10.5 and later.

Declared in CalCalendar.h.

CalCalendarTypeSubscription

A subscribed calendar.

Available in Mac OS X v10.5 and later.

Declared in CalCalendar.h.

Declared In
CalendarStore/CalCalendar.h


Last updated: 2009-02-03

Did this document help you? Yes It's good, but... Not helpful...