Maryan Pasichniak Maryan Pasichniak - 1 year ago 126
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.

Answer Source

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!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download