我运行的情况是至少EKCalendarTypeLocal类型的本地日历由EKEventStore列出,但未显示,并且无法在iOS上的日历应用程序中选择。如何检查EKCalendar是否可见
if ([eventStore respondsToSelector:@selector(calendarsForEntityType:)]) cals = [eventStore calendarsForEntityType:EKEntityTypeEvent];
else cals = eventStore.calendars;
我发现它可能与iCloud Accessing programmatically created calendar on iOS device有关。 我也成功创建了本地日历,并且可以向它添加事件。这个创建的日历不是由EKEventStore列出,但我与它的标识符得到它:
aCal = [eventStore calendarWithIdentifier:calId];
之后我删除在检验设备的iCloud帐户的所有本地日历也显示我自己的创造。有没有可能检查本地日历是否隐藏?所以我可以写一个信息文本或隐藏它们。
欢迎来到堆栈溢出!你能否提供一个代码示例? – IronMan84
谢谢你的欢迎:)请在这里看到我的答案http://stackoverflow.com/questions/13869118/ios-ekevent-store-recreating-icloud-calendars-in-a-loop-wont-save-local/13991658# 13991658 – Alex75