每一个,我正在使用目标c中的gdata库为iphone应用程序检索谷歌日历事件,我这样做,
for( int i=0; i<count; i++ ){
NSMutableArray *temporary=[[NSMutableArray alloc]init];
[temporary removeAllObjects];
GDataEntryCalendarEvent *event = [events objectAtIndex:i];
// [controller.googlearray addObject:event];
GDataWhen *when = [[event objectsForExtensionClass:[GDataWhen class]] objectAtIndex:0];
if( when ){
NSDate *date1 = [[when startTime] date];
NSDate *date = [date1 dateByAddingTimeInterval:18000.0];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yy-MM-dd-HH-mm"];
[temporary addObject:date];///1 date
NSDate *date11=[[when endTime] date];
NSDate *date2 = [date11 dateByAddingTimeInterval:18000.0];
// [controller.array_objject.google_events insertObject:date atIndex:i];///2 date
[temporary addObject:date2];///1 date
[dateFormatter release];
}
//[controller.array_objject.google_events insertObject:[[event title] stringValue] atIndex:i]; /////3 title
[temporary addObject:[[event title] stringValue]];///1 date
GDataWhere *addr = [[event locations] objectAtIndex:0];
if( addr )
//[controller.array_objject.google_events insertObject:[addr stringValue] atIndex:i];///// 4 location
[temporary addObject:[addr stringValue]];
[controller.googlearray addObject:temporary];///// 4 location
}
现在我在这里检索事件的开始和结束时间,标题,位置等,但我还想检索事件的描述(如果用户在谷歌日历上创建事件时输入事件详细信息),所以在这种情况下,我想要检索那个描述或事件的细节,我努力但保留,PLZ。提前告诉我这件事。关心萨阿德