我看在mail和webView里有日期顯示,就可以點擊然后出來一個actionsheet,讓用戶選擇創(chuàng)建一個日歷事件。
那在程序里有沒有這種接口?有沒有可能,我通過程序去創(chuàng)建一個日歷事件?系統(tǒng)那個ActionSheet,不是我說啊,太難看了。。。
擁有18年軟件開發(fā)和IT教學(xué)經(jīng)驗。曾任多家上市公司技術(shù)總監(jiān)、架構(gòu)師、項目經(jīng)理、高級軟件工程師等職務(wù)。 網(wǎng)絡(luò)人氣名人講師,...
Check EKEvent out
EKEventStore *eventDB = [[EKEventStore alloc] init]; EKEvent *myEvent = [EKEvent eventWithEventStore:eventDB]; myEvent.title = @"New Event"; myEvent.startDate = [[NSDate alloc]init ]; myEvent.endDate = [[NSDate alloc]init ]; myEvent.allDay = YES; [myEvent setCalendar:[eventDB defaultCalendarForNewEvents]]; NSError *err; [eventDB saveEvent:myEvent span:EKSpanThisEvent error:&err]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Event Created" message:@"Yay!?" delegate:nil cancelButtonTitle:@"Okay" otherButtonTitles:nil]; [alert show];