这是代码:
EKEventStore *store = [[EKEventStore alloc]
initWithAccessToEntityTypes:EKEntityMaskEvent];
NSArray *eventCalendars = [store calendarsForEntityType:EKEntityTypeEvent];
NSDate *monday, *sunday;
NSPredicate *predicate;
predicate = [store predicateForEventsWithStartDate:monday
endDate:sunday
calendars:eventCalendars];
NSArray *events = [store eventsMatchingPredicate:predicate];
NSLog(@"Events this week:");
for (EKEvent *event in events) {
NSLog(@"%@ - starts at %@", event.title, event.startDate);
}
我收到一条错误消息,提示“使用未声明的标识符'EKEntityMaskEvent'”和使用未声明的标识符'EKEntityTypeEvent'
我该如何解决?