84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我看在mail和webView里有日期显示,就可以点击然后出来一个actionsheet,让用户选择创建一个日历事件。那在程序里有没有这种接口?有没有可能,我通过程序去创建一个日历事件?系统那个ActionSheet,不是我说啊,太难看了。。。
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
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];
Check EKEvent out