Iphone How can I add events to the calendar?

I am trying to create a calendar and view a calendar in which I can create, edit or delete events when I click a button, the created events should be viewed weekly. I tried feces, the tapku Calendar library, but could not find a suitable one. Is there any link or code that could help me with this

+3
source share
1 answer
#import <EventKit/EventKit.h>
#import <EventKitUI/EventKitUI.h>

EKEventViewController *detailViewController;
EKEventStore *eventStore;
eventStore = [[EKEventStore alloc] init]; 
EKEvent *event = [EKEvent eventWithEventStore:eventStore]; 
event.title = @"Test Event"; 
event.startDate = copyofnextappdt; 
event.endDate = copyofnextappdt;
[event setCalendar:[eventStore defaultCalendarForNewEvents]];
NSError *err;
[eventStore saveEvent:event span:EKSpanThisEvent error:&err];
+3
source

All Articles