Note that there are some explanatory texts on larger screens.

plurals
  1. POFetching photos from Picasa using GData in iOS
    text
    copied!<p>I'm trying to get a photo thumbnail from the photo album present in Picasa account. I'm using Collection View for displaying the albums with a <code>UIImageView</code> inside the cells to display one of the photos from the album.</p> <p>The problem is, sometimes when I run the code, the cells do not reflect the thumbnails and display a white background but when I put a breakpoint inside the datasource method-- <code>(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath;</code> I can see the images getting set to the image view inside the cells and ultimately the photos on each cell after that.</p> <p>I don't want to use <code>NStimer</code> to hold the Segue. Anyone having suggestions please...</p> <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ static NSString *identifier = @"Cell"; UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath]; // Configure the cell... GDataEntryPhotoAlbum *albumEntry = [app.albums objectAtIndex:indexPath.row]; if(app.albums.count&gt;albumThumbnails.count) { [[GDataPhotoWrapper sharedGDataPhotoWrapperInstance] setDelegateGDataPhotoWrapper:self]; [[GDataPhotoWrapper sharedGDataPhotoWrapperInstance] fetchImageForSelectedAlbum:albumEntry]; } cell.backgroundView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"photo-frame.png"]]; UILabel *albumTitle = (UILabel*)[cell viewWithTag:200]; albumTitle.text = [[albumEntry title] stringValue]; if(albumThumbnails.count==app.albums.count) { UIImageView *thumbnail = (UIImageView *)[cell viewWithTag:1]; thumbnail.image = (UIImage*)[albumThumbnails objectAtIndex:indexPath.row]; } return cell; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload