I am trying to load images from Google Drive using google's example
- (void)loadDriveFiles {
GTLQueryDrive *query = [GTLQueryDrive queryForFilesList];
query.q = @"mimeType = 'image/png'";
UIAlertView *alert = [DrEditUtilities showLoadingMessageWithTitle:@"Loading files"
delegate:self];
[self.driveService executeQuery:query completionHandler:^(GTLServiceTicket *ticket,
GTLDriveFileList *files,
NSError *error) {
[alert dismissWithClickedButtonIndex:0 animated:YES];
if (error == nil) {
if (self.driveFiles == nil) {
self.driveFiles = [[NSMutableArray alloc] init];
}
[self.driveFiles removeAllObjects];
[self.driveFiles addObjectsFromArray:files.items];
[self.tableView reloadData];
} else {
NSLog(@"An error occurred: %@", error);
//show error
}
}];
}
And Displaying it on table view as shown
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
cell.imageView.image=[UIImage imageNamed:[NSString stringWithFormat:@"%@",file.title]];
}
It does not show the images, do I have to download the images first and if yes, could you please provide sample code.