我可以访问模拟器日历中的所有活动。
array
看起来很丑陋。
我的代码是,
(void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSCalendar *calendar = [NSCalendar currentCalendar];
EKEventStore *eventStore = [[EKEventStore alloc]init];
NSDateComponents *oneDayAgoComponents = [[NSDateComponents alloc] init];
oneDayAgoComponents.day = -1;
NSDate *oneDayAgo = [calendar dateByAddingComponents:oneDayAgoComponents toDate:[NSDate date] options:0];
// Create the end date components
NSDateComponents *oneYearFromNowComponents = [[NSDateComponents alloc] init];
oneYearFromNowComponents.month = 1;
NSDate *oneYearFromNow = [calendar dateByAddingComponents:oneYearFromNowComponents toDate:[NSDate date] options:0];
// Create the predicate from the event store's instance method
NSPredicate *predicate = [eventStore predicateForEventsWithStartDate:oneDayAgo endDate:oneYearFromNow calendars:nil];
// Fetch all events that match the predicate
NSArray *events = [eventStore eventsMatchingPredicate:predicate];
NSLog(@"The content of array is%@",events);
}
我的问题是:
我怎样才能显示突出显示的字符串(显示图像),这就是我可以在table view cell
上显示的内容。
提前致谢