下面是代碼:如何解決此錯誤消息:「未聲明的標識符」?
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」
我該如何解決這個問題?
其實它是關於iOS而不是OS X,但沒關係。 –