EKCalendarChooser Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/EventKitUI.framework
Availability
Available in iOS 5.0 and later.
Declared in
EKCalendarChooser.h

Overview

An instance of the EKCalendarChooser class is a view controller that displays an interface for selecting one or more calendars in an event store. This view controller can be pushed on a navigation stack or presented modally. Use a delegate that conforms to the EKCalendarChooserDelegate protocol to receive callbacks when the user selects calendars or cancels the operation.

Tasks

Initializing Calendar Choosers

Accessing Properties

Changing the Appearance

Properties

delegate

The calendar chooser’s delegate.

@property(nonatomic, assign) id<EKCalendarChooserDelegate> delegate
Discussion

This object should conform to the EKCalendarChooserDelegate protocol.

Availability
  • Available in iOS 5.0 and later.
Declared In
EKCalendarChooser.h

selectedCalendars

The calendars selected by the user.

@property(nonatomic, copy) NSSet *selectedCalendars
Availability
  • Available in iOS 5.0 and later.
Declared In
EKCalendarChooser.h

selectionStyle

Determines whether multiple selections are allowed. (read-only)

@property(nonatomic, readonly) EKCalendarChooserSelectionStyle selectionStyle
Discussion

Possible values are described in “EKCalendarChooserSelectionStyle.”

Availability
  • Available in iOS 5.0 and later.
Declared In
EKCalendarChooser.h

showsCancelButton

A Boolean value that determines whether the Cancel button is shown when this controller is presented modally by a navigation controller.

@property(nonatomic) BOOL showsCancelButton
Discussion

YES to show the Cancel button; otherwise, NO.

Availability
  • Available in iOS 5.0 and later.
Declared In
EKCalendarChooser.h

showsDoneButton

A Boolean value that determines whether the Done button is shown when this controller is presented modally by a navigation controller.

@property(nonatomic) BOOL showsDoneButton
Discussion

YES to show the Done button; otherwise, NO.

Availability
  • Available in iOS 5.0 and later.
Declared In
EKCalendarChooser.h

Instance Methods

initWithSelectionStyle:displayStyle:entityType:eventStore:

Initializes a newly created calendar chooser for a specific entity type.

- (id)initWithSelectionStyle:(EKCalendarChooserSelectionStyle)selectionStyle displayStyle:(EKCalendarChooserDisplayStyle)displayStyle entityType:(EKEntityType)entityType eventStore:(EKEventStore *)eventStore
Parameters
selectionStyle

Determines whether multiple selections are allowed. Possible values are described in “EKCalendarChooserSelectionStyle.”

displayStyle

Determines which calendars are displayed. Possible values are described in “EKCalendarChooserDisplayStyle.”

entityType

The entity type of the calendar. Possible values are EKEntityTypeEvent and EKEntityTypeReminder.

eventStore

The event store that the calendars belong to.

Return Value

The initialized calendar chooser.

Availability
  • Available in iOS 6.0 and later.
Declared In
EKCalendarChooser.h

initWithSelectionStyle:displayStyle:eventStore:

Initializes a newly created calendar chooser.

- (id)initWithSelectionStyle:(EKCalendarChooserSelectionStyle)selectionStyle displayStyle:(EKCalendarChooserDisplayStyle)displayStyle eventStore:(EKEventStore *)eventStore
Parameters
selectionStyle

Determines whether multiple selections are allowed. Possible values are described in “EKCalendarChooserSelectionStyle.”

displayStyle

Determines which calendars are displayed. Possible values are described in “EKCalendarChooserDisplayStyle.”

eventStore

The event store that the calendars belong to.

Return Value

The initialized calendar chooser.

Availability
  • Available in iOS 5.0 and later.
Declared In
EKCalendarChooser.h

Constants

EKCalendarChooserDisplayStyle

The style of the chooser.

typedef enum {
   EKCalendarChooserDisplayAllCalendars,
   EKCalendarChooserDisplayWritableCalendarsOnly
} EKCalendarChooserDisplayStyle;
Constants
EKCalendarChooserDisplayAllCalendars

The chooser displays both readable and writable calendars.

Available in iOS 5.0 and later.

Declared in EKCalendarChooser.h.

EKCalendarChooserDisplayWritableCalendarsOnly

The chooser displays writable calendars only.

Available in iOS 5.0 and later.

Declared in EKCalendarChooser.h.

EKCalendarChooserSelectionStyle

The style of selecting calendars.

typedef enum {
   EKCalendarChooserSelectionStyleSingle,
   EKCalendarChooserSelectionStyleMultiple
} EKCalendarChooserSelectionStyle;
Constants
EKCalendarChooserSelectionStyleSingle

The style that allows single selection of calendars.

Available in iOS 5.0 and later.

Declared in EKCalendarChooser.h.

EKCalendarChooserSelectionStyleMultiple

The style that allows multiple selections of calendars.

Available in iOS 5.0 and later.

Declared in EKCalendarChooser.h.