0

How to add Event in iPhone Calendar. I just want to add events in iPhone calendar using my application and wants to set pushnotification for perticuler event. Please help me out on this. Thank you.

Brad Werth
  • 17,411
  • 10
  • 63
  • 88
user532445
  • 723
  • 2
  • 13
  • 28
  • Possible duplicate for http://stackoverflow.com/questions/246249/programmatically-add-custom-event-in-the-iphone-calendar – Mahendra Liya Apr 16 '12 at 18:35

2 Answers2

1

To create an Event programmatically, you would use EventKit, more specifically the provided EKEventEditViewController. See the Apple documentation for an explanation and sample code.

In iOS 4.0+, you would also be able to access that controller without writing any EventKit code. To do that, use a UITextView configured with dataDetectorTypes = UIDataDetectorTypeCalendarEvent. The UITextView will automatically convert strings representing formatted dates, days of the week, etc. - to clickable URLs that handle the creation of events.

Please refer to the Apple iOS documentation for the rest of your question. If there is anything specific that doesn't work in your case, please post some code, show us what you have tried already, etc.

octy
  • 6,525
  • 1
  • 28
  • 38
0

you can use this code

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

[self presentModalViewController:controller animated:YES];
[controller release];
Jean
  • 5,201
  • 11
  • 51
  • 87