title: iOS calendar repeating event
body: <p>Good day,
  I can't add custom event in standard iOS Calendar that will be repeated (during for example 2 months).</p>
  
  <p>The problem is that my event is just up to the end of current month. It doesn't matter which day it will start - it will be repeating only during this month.
  Code:</p>
  
  <pre><code>EKEventStore *store = [[EKEventStore alloc] init];
  [store requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) 
  {
      if (!granted)  
          return; 
      // setting the values directly for testing purpose.
      EKRecurrenceEnd *endRecurrence = nil;
      NSMutableArray *daysOfTheWeekArray = [NSMutableArray array];
  
      //Only weekends
      [daysOfTheWeekArray addObject:[EKRecurrenceDayOfWeek dayOfWeek:6]];
      [daysOfTheWeekArray addObject:[EKRecurrenceDayOfWeek dayOfWeek:7]];
  
      endRecurrence = [EKRecurrenceEnd recurrenceEndWithEndDate:[[NSDate date] dateByAddingTimeInterval:60*60*24*7*10]]];
  
      //create the recurrence rule here
      EKRecurrenceRule *recurrence = [[EKRecurrenceRule alloc] initRecurrenceWithFrequency: EKRecurrenceFrequencyYearly
                                                                                  interval:1
                                                                             daysOfTheWeek:daysOfTheWeekArray
                                                                            daysOfTheMonth:nil
                                                                           monthsOfTheYear:nil
                                                                            weeksOfTheYear:nil
                                                                             daysOfTheYear:nil
                                                                              setPositions:nil
                                                                                       end:endRecurrence];
  
      EKEvent *event = [EKEvent eventWithEventStore:store];
      event.title = @"Title";
      event.startDate = [NSDate date]; //today
      event.endDate = [event.startDate dateByAddingTimeInterval:60*60];  //set 1 hour meeting
      [event addRecurrenceRule: recurrence];
  
      [event setCalendar:[store defaultCalendarForNewEvents]];
      NSError *err = nil;
      [store saveEvent:event span:EKSpanThisEvent commit:YES error:&amp;err];
  }]; 
  </code></pre>