Maryan Pasichniak Maryan Pasichniak - 4 months ago 14
iOS Question

Create repeatable event in EKCalendar

I am fresh-developer from Ukraine and I started my path from


I have the following question: I created an
with a couple of events. And I need that events become repeatable, like every day, every month, etc.


I glad to see u in our IOS COMMUNITY!! hurray! hurray! So lets back to the business! To create "repeatable" event (in our circles it calls RecurrenceRule) (LOL), you need this

 EKRecurrenceFrequency  freq= EKRecurrenceFrequencyWeekly; //(weekly repeat)
 EKRecurrenceEnd * end = [EKRecurrenceEnd recurrenceEndWithEndDate:[NSDate date]];//end of rule
 EKRecurrenceRule * rule = [[EKRecurrenceRule alloc]initRecurrenceWithFrequency:freq interval:1 end:end];
 [event setRecurrenceRules:@[rule]];

See? It so easy to coding! If you have any questions dont shy! Ask me!