0

A the title suggests when presenting the view for an event using EventKit my title string does not show in the presented view, its just blank

  EKEventStore *es = [[EKEventStore alloc] init];
                EKEventEditViewController *controller = [[EKEventEditViewController alloc] init];
                controller.eventStore = es;
                controller.editViewDelegate = self;

                EKEvent *event  = [EKEvent eventWithEventStore:eventStore];
                event.title = @"This is an event"; //does not appear in presented view

               [self.editController presentModalViewController:controller animated:YES];

               [event setCalendar:[eventStore defaultCalendarForNewEvents]];
JSA986
  • 5,870
  • 9
  • 45
  • 91

1 Answers1

1

You should assign event object to controller.

controller.event = event;
Apurv
  • 17,116
  • 8
  • 51
  • 67