EKReminder Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/EventKit.framework
Availability
Available in iOS 6.0 and later.
Companion guide
Declared in
EKReminder.h

Overview

An instance of the EKReminder class represents a reminder added to a calendar in the Event Kit framework.

Use the reminderWithEventStore: method to create a new reminder. Use the properties in the class to get and modify certain information about a reminder.

Tasks

Creating a Reminder

Accessing Reminder Properties

Properties

completed

A Boolean value determining whether or not the reminder is marked completed.

@property(nonatomic, getter=isCompleted) BOOL completed
Discussion

Setting this property to YES will set completionDate to the current date; setting this property to NO will set completionDate to nil.

Special Considerations

If the reminder was completed using a different client, you may encounter the case where this property is YES, but completionDate is nil.

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

completionDate

The date on which the reminder was completed.

@property(nonatomic, copy) NSDate *completionDate
Discussion

Setting this property to a date will set completed to YES; setting this property to nil will set completed to NO.

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

dueDateComponents

The date by which the reminder should be completed.

@property(nonatomic, copy) NSDateComponents *dueDateComponents
Discussion

The use of date components allows the due date and its time zone to be represented in a single property. A nil time zone represents a floating date. Setting a date component without an hour, minute and second component will set the reminder to be an all-day reminder. If this property is set, the calendar must be set to NSGregorianCalendar; otherwise an exception is raised.

This components’s timeZone property is independent of time zone properties on startDateComponents and its super EKCalendarItem object. By default, the due date is set to the system time zone.

Special Considerations

On iOS, Event Kit requires that a start date is set if the due date is set, however this is not a requirement on OS X.

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

startDateComponents

The start date of the task.

@property(nonatomic, copy) NSDateComponents *startDateComponents
Discussion

The use of date components allows the start date and its time zone to be represented in a single property. A nil time zone represents a floating date. Setting a date component without an hour, minute and second component will set the reminder to be an all-day reminder. If this property is set, the calendar must be set to NSGregorianCalendar; otherwise an exception is raised.

The start date components’s timeZone property corresponds to the timeZone property on EKCalendarItem. A change in one value will cause a change in the other. Setting the time zone directly on the components does not guarantee that your changes will be saved; instead, pull this property from the reminder, set the time zone on it, and assign it back to the reminder:

NSDateComponents *start = myEKReminder.startDateComponents;
start.timeZone = myNSTimeZone;
myEKReminder.startDateComponents = start;
Availability
  • Available in iOS 6.0 and later.
Declared In
EKReminder.h

Class Methods

reminderWithEventStore:

Creates and returns a new reminder in the given event store.

+ (EKReminder *)reminderWithEventStore:(EKEventStore *)eventStore
Parameters
eventStore

The event store.

Return Value

The created reminder.

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