I am trying to represent the recurrence rule,
Every 4 years only on 4th of July.
like this:
termin.addRecurrenceRule(EKRecurrenceRule(recurrenceWithFrequency: .Yearly,
interval: 4,
daysOfTheWeek: nil,
daysOfTheMonth: [NSNumber(int: 4)],
monthsOfTheYear: [NSNumber(int :7)],
weeksOfTheYear: nil,
daysOfTheYear: nil,
setPositions: nil,
end: nil))
but Apple documentation says:
daysOfTheMonth: 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
.
Then how can I represent the above mentioned rule with the EKRecurrenceRule
class?
NB: The answers could be in Swift or Objc.