if ([eventStore.calendars count] == 0)
{
NSLog(@"No calendars are found.");
return NO;
}
EKCalendar *targetCalendar = nil;
/* Try to find the calendar that the user asked for */
for (EKCalendar *thisCalendar in eventStore.calendars){ line2
if ([thisCalendar.title isEqualToString:paramCalendarTitle] &&
thisCalendar.type == paramCalendarType){
targetCalendar = thisCalendar;
break;
}
}
第 1 行和第 2 行出现错误:“不推荐使用日历:在 IOS 6 中首先不推荐使用”
如何解决?