Class

EKRecurrenceRule

A class that describes the recurrence pattern for a recurring event.

Declaration

class EKRecurrenceRule : EKObject

Overview

After you create a recurrence rule, assign it to an event with the recurrenceRule method of EKEvent.

Recurrence rules can have an end, represented by an EKRecurrenceEnd object. The end can be based on a specific date or a maximum number of occurrences.

Topics

Creating a Basic Recurrence Rule

enum EKSpan

An object that indicates whether modifications should apply to a single event or all future events of a recurring event.

init(recurrenceWith: EKRecurrenceFrequency, interval: Int, end: EKRecurrenceEnd?)

Initializes and returns a simple recurrence rule with a given frequency, interval, and end.

Accessing Recurrence Rule Properties

enum EKRecurrenceFrequency

The frequency for recurrence rules.

var calendarIdentifier: String

The identifier for the recurrence rule’s calendar.

var recurrenceEnd: EKRecurrenceEnd?

Indicates when the recurrence rule ends.

var frequency: EKRecurrenceFrequency

The frequency of the recurrence rule.

var interval: Int

Specifies how often the recurrence rule repeats over the unit of time indicated by its frequency.

var firstDayOfTheWeek: Int

Indicates which day of the week the recurrence rule treats as the first day of the week.

var daysOfTheWeek: [EKRecurrenceDayOfWeek]?

The days of the week associated with the recurrence rule, as an array of EKRecurrenceDayOfWeek objects.

var daysOfTheMonth: [NSNumber]?

The days of the month associated with the recurrence rule, as an array of NSNumber objects.

var daysOfTheYear: [NSNumber]?

The days of the year associated with the recurrence rule, as an array of NSNumber objects.

var weeksOfTheYear: [NSNumber]?

The weeks of the year associated with the recurrence rule, as an array of NSNumber objects.

var monthsOfTheYear: [NSNumber]?

The months of the year associated with the recurrence rule, as an array of NSNumber objects.

var setPositions: [NSNumber]?

An array of ordinal numbers that filters which recurrences to include in the recurrence rule’s frequency.

Relationships

Inherits From

See Also

Recurrence

Creating a Recurring Event

Set up an event or reminder that repeats.

class EKRecurrenceDayOfWeek

A class that represents the day of the week.

class EKRecurrenceEnd

A class that defines the end of a recurrence rule.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software