title: Wrong image load in uicollectionviewcell when scrollling
body: <p>I am using a <code>UICollectionview</code> to show a lot of Custom cells (250 more or less).</p>
  
  <p>Those cells have a main Image and some text. As the images have to be downloaded from the Internet I am using the external library <code>AsyncImageView</code> to do the lazy load stuff.</p>
  
  <p>But the problem is that the reusable property of the cells are making me crazy. </p>
  
  <p>When I scroll the images appear in the wrong cells. How can I add a tag or something to the images apart from the indexpath to avoid the problem? </p>
  
  <p>Maybe <code>AsyncImageView</code> has a solution to the problem which I ignore ...</p>
  
  <p>Or another alternative would be a better choice?</p>
  
  <p>Any clue?</p>
  
  <p>Thanks in advance</p>
  
  <p>Edit: A simplified version of my code</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
  
  static NSString *identifier = @"Cell";
  
  CollectionComercioCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];
  
  
  if (cell == nil){
  }
  else{
      [[AsyncImageLoader sharedLoader] cancelLoadingImagesForTarget: cell.myImage];
  }
  
  cell.myImage.imageURL = nil;
  cell.myImage.image = nil;
  
  cell.myImage.hidden = TRUE;
  
  cell.myImage.imageURL = [[myArray objectAtIndex:indexPath.row] getLogoUrl];
  
  cell.myText.text = [[myArray objectAtIndex:indexPath.row] getName];
  
  cell.myImage.hidden = FALSE;
  
  return cell;
  </code></pre>
  
  <p>}</p>
  
  <p>CustomCell.m</p>
  
  <pre><code>- (void)prepareForReuse
  {
      [super prepareForReuse];    
      self.myImage.image = nil;  
  }
  </code></pre>