title: Creating a calendar event with an alarm using EKEventEditViewController
body: <p>I'm using the following code to create an event, and display a popup asking the user to save the event:</p>
  
  <pre><code>EKEventStore *eventStore = [[EKEventStore alloc] init];
  EKCalendar *calendar = [eventStore defaultCalendarForNewEvents];
  EKEvent *event = [EKEvent eventWithEventStore:eventStore];
  event.calendar = calendar;
  event.title = [NSString stringWithFormat:@"Event: %@", [self.event title]]; 
  event.location = self.event.location;
  event.notes = [self stringByStrippingHTML: [self.event description]];
  event.startDate = [self.event startDate]; 
  event.endDate = [self.event endDate];
  
  NSTimeInterval alarmOffset = -1*60*60;//1 hour
  EKAlarm *alarm = [EKAlarm alarmWithRelativeOffset:alarmOffset];
  
  [event addAlarm:alarm];
  EKEventEditViewController *eventViewController = [[EKEventEditViewController alloc] init];
  eventViewController.event = event;
  eventViewController.eventStore=eventStore;
  eventViewController.editViewDelegate = self;
  [self.navigationController presentModalViewController:eventViewController animated:YES];
  </code></pre>
  
  <p>This works fine except the event alarm property doesn't get set as you can see form the image below:</p>
  
  <p><img src="https://i.stack.imgur.com/4myEm.png" alt="Alarm Not Set"></p>
  
  <p>If I save the event before showing the view controller it does get the alarm set.</p>
  
  <p>Please note I'm using the LLVM compiler, so don't worry about not releasing stuff!</p>
  
  <p>Ta</p>
  
  <p>Ross</p>