2012-06-05 21 views

回答

1

事件套件做到這一點......只要你有一個叫EKEventStore myEventStore,定義像這樣的日曆數組:

NSArray *calendarArray = myEventStore.calendars; 

,並獲取這樣

NSPredicate *fetchAllEvents = [self.myEventStore predicateForEventsWithStartDate:[NSDate distantPast] endDate:[NSDate distantFuture] calendars:calendarArray]; //you can modify this predicate, just keep calendar:calendarArray 
NSArray *allEvents = [self.myEventStore eventsMatchingPredicate:fetchAllEvents]; 
+0

事件太感謝你了... – SpokaneDude

+0

@ spokane-dude沒問題。我實際上遇到了同樣的問題,我的一個應用程序稍後回來,碰到這個... – gtmtg