iOS Reference Library Apple Developer
Search

Creating Recurring Events

Recurring events are events that repeat daily, weekly, monthly, or yearly. The pattern that repeats can be complex. For example, you might schedule an event every Tuesday and Thursday of the first and second week of every month of the year.

You make an event a recurring event by assigning it a recurrence rule, which describes when the event occurs. Recurrence rules are represented by instances of the EKRecurrenceRule class.

Creating a Basic Recurrence Rule

You can create a recurrence rule with a simple daily, weekly, monthly, or yearly pattern with the initRecurrenceWithFrequency:interval:end: method. You provide three values to this method:

Creating a Complex Recurrence Rule

You can create a recurrence rule with a complex pattern with the initRecurrenceWithFrequency:interval:daysOfTheWeek:daysOfTheMonth:monthsOfTheYear:weeksOfTheYear:daysOfTheYear:setPositions:end: method. As you do for a basic recurrence rule, you provide a frequency, an interval, and an optional end for the recurrence. In addition, you can provide the following values:

You can provide values for any number of the above parameters (parameters that don’t apply to a particular recurrence rule are ignored). If you provide a value for more than one of the above parameters, the recurrence occurs only on days that apply to all provided values.




Last updated: 2010-08-03

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