My code is following
EKEventEditViewController *addController = [[EKEventEditViewController alloc] initWithNibName:nil bundle:nil];
// set the addController's event store to the current event store.
addController.eventStore = self.eventStore;
// present EventsAddViewController as a modal view controller
[self presentModalViewController:addController animated:YES];
addController.editViewDelegate = self;
[addController release];
It will appear new event ViewController. I want to initialize title and note in EKEventEditViewController.
I found a way.
EKEventStore *eventStore = [[EKEventStore alloc] init];
EKEvent *event = [EKEvent eventWithEventStore:eventStore];
event.startDate = event_date;
event.endDate = event_date;
event.notes=event_note;
EKEventEditViewController *addController = [[EKEventEditViewController alloc] initWithNibName:nil bundle:nil];
// set the addController's event store to the current event store.
addController.eventStore = eventStore;
addController.event=event;
// present EventsAddViewController as a modal view controller
[parent presentModalViewController:addController animated:YES];
addController.editViewDelegate = self;
[addController release];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With