Class: EKRecurrenceRule

Inherits:
EKObject show all

Overview

The EKRecurrenceRule class is used to describe the recurrence pattern for a recurring event.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from EKObject

#hasChanges, #isNew, #refresh, #reset, #rollback

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (String) calendarIdentifier (readonly)

The identifier for the recurrence rule’s calendar. (read-only)

Returns:

- (Array) daysOfTheMonth (readonly)

The days of the month associated with the recurrence rule, as an array of NSNumber objects. Values can be from 1 to 31 and from -1 to -31.This property value is valid only for recurrence rules that were initialized with specific days of the month and a frequency type of EKRecurrenceFrequencyMonthly. (read-only) Negative values indicate counting backwards from the end of the month.

Returns:

- (Array) daysOfTheWeek (readonly)

The days of the week associated with the recurrence rule, as an array of EKRecurrenceDayOfWeek objects. This property value is valid only for recurrence rules that were initialized with specific days of the week and a frequency type of EKRecurrenceFrequencyWeekly, EKRecurrenceFrequencyMonthly, or EKRecurrenceFrequencyYearly. (read-only)

Returns:

- (Array) daysOfTheYear (readonly)

The days of the year associated with the recurrence rule, as an array of NSNumber objects. Values can be from 1 to 366 and from -1 to -366. This property value is valid only for recurrence rules initialized with a frequency type of EKRecurrenceFrequencyYearly. (read-only) Negative values indicate counting backwards from the end of the year.

Returns:

- (Integer) firstDayOfTheWeek (readonly)

Indicates which day of the week the recurrence rule treats as the first day of the week. Values of 1 to 7 correspond to Sunday through Saturday. A value of 0 indicates that this property is not set for the recurrence rule. (read-only)

Returns:

- (EKRecurrenceFrequency) frequency (readonly)

The frequency of the recurrence rule. (read-only)

- (Integer) interval (readonly)

Specifies how often the recurrence rule repeats over the unit of time indicated by its frequency. For example, a recurrence rule with a frequency type of EKRecurrenceFrequencyWeekly and an interval of 2 repeats every two weeks. (read-only)

Returns:

- (Array) monthsOfTheYear (readonly)

The months of the year associated with the recurrence rule, as an array of NSNumber objects. Values can be from 1 to 12. This property value is valid only for recurrence rules initialized with specific months of the year and a frequency type of EKRecurrenceFrequencyYearly. (read-only)

Returns:

- (EKRecurrenceEnd) recurrenceEnd

Indicates when the recurrence rule ends. This can be represented by an end date or a number of occurrences.

Returns:

- (Array) setPositions (readonly)

An array of ordinal numbers that filters which recurrences to include in the recurrence rule’s frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday, and a setPositions array containing 2 and -1, occurs only on the second weekday and last weekday of every year. (read-only) Values can be from 1 to 366 and from -1 to -366.Negative values indicate counting backwards from the end of the recurrence rule’s frequency (week, month, or year).

Returns:

- (Array) weeksOfTheYear (readonly)

The weeks of the year associated with the recurrence rule, as an array of NSNumber objects. Values can be from 1 to 53 and from -1 to -53. This property value is valid only for recurrence rules initialized with specific weeks of the year and a frequency type of EKRecurrenceFrequencyYearly. (read-only) Negative values indicate counting backwards from the end of the year.

Returns:

Instance Method Details

- (Object) initRecurrenceWithFrequency(type, interval:interval, daysOfTheWeek:days, daysOfTheMonth:monthDays, monthsOfTheYear:months, weeksOfTheYear:weeksOfTheYear, daysOfTheYear:daysOfTheYear, setPositions:setPositions, end)

Initializes and returns a recurrence rule with a given frequency and additional scheduling information. Negative values indicate counting backwards from the end of the recurrence rule’s frequency.

Parameters:

  • type (EKRecurrenceFrequency)

    The frequency of the recurrence rule. Can be daily, weekly, monthly, or yearly.

  • interval (Integer)

    The interval between instances of this recurrence. For example, a weekly recurrence rule with an interval of 2 occurs every other week. Must be greater than 0.

  • days (Array)

    The days of the week that the event occurs, as an array of EKRecurrenceDayOfWeek objects.

  • monthDays (Array)

    The days of the month that the event occurs, as an array of NSNumber objects. Values can be from 1 to 31 and from -1 to -31. This parameter is only valid for recurrence rules of type EKRecurrenceFrequencyMonthly.

  • months (Array)

    The months of the year that the event occurs, as an array of NSNumber objects. Values can be from 1 to 12. This parameter is only valid for recurrence rules of type EKRecurrenceFrequencyYearly.

  • weeksOfTheYear (Array)

    The weeks of the year that the event occurs, as an array of NSNumber objects. Values can be from 1 to 53 and from -1 to -53. This parameter is only valid for recurrence rules of type EKRecurrenceFrequencyYearly.

  • daysOfTheYear (Array)

    The days of the year that the event occurs, as an array of NSNumber objects. Values can be from 1 to 366 and from -1 to -366. This parameter is only valid for recurrence rules of type EKRecurrenceFrequencyYearly.

  • setPositions (Array)

    An array of ordinal numbers that filters which recurrences to include in the recurrence rule’s frequency. See setPositions for more information.

  • end (EKRecurrenceEnd)

    The end of the recurrence rule.

Returns:

  • (Object)

    The initialized recurrence rule, or nil if invalid values are provided.