<分区>
如何在 iOS 5 中将日历(不是事件)添加到 EKEventStore?
<分区>
如何在 iOS 5 中将日历(不是事件)添加到 EKEventStore?
最佳答案
我捕获了一个异常,除非我也捕获了:
// Get the calendar source
EKSource* localSource;
for (EKSource* source in eventStore.sources) {
if (source.sourceType == EKSourceTypeLocal)
{
localSource = source;
break;
}
}
if (!localSource)
return;
calendar = [EKCalendar calendarWithEventStore:eventStore];
calendar.source = localSource;
自然地,看看其他 EKSourceType 枚举,看看哪个适合您的需要。
关于objective-c - 使用 EventKit 将新日历添加到 EKEventStore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7945537/