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中首先弃用”
怎么解决?