Im trying to set the start date 1 year in advance when adding an event using Eventkit Framework.
so far I have looked on SO, done a google search and tried
controller.event.startDate = [[[NSDate alloc] initWithTimeInterval: 525960];
controller.event.endDate= [[NSDate alloc] init];
I get an error saying NSDate declares the selector initWithTimeInterval
Do not do it as interval= 525960.
Instead use NSCalender and then manipulate by adding 1 to current year.
NSCalendar *calendar=[[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar] ;
NSDateComponents *components=[[NSDateComponents alloc] init] ;
components.year=1;
NSDate *newDate=[calendar dateByAddingComponents: components toDate:[NSDate date] options: 0];
NSLog(@"Next year : %@", newDate);