title: UITableView with Json file, loading images to cell disappear
body: <p>I am using asyncimageview classes nicely provided by: <a href="http://www.markj.net/iphone-asynchronous-table-image/" rel="nofollow noreferrer">http://www.markj.net/iphone-asynchronous-table-image/</a></p>
  
  <p>I am getting image urls from a json file and loading each image to a cell.</p>
  
  <p>Problem:</p>
  
  <p>When i scroll up, and scroll back down to the same cell, the image reloads (disappears and appears again). I can't figure out why the image keeps reloading? Does anyone have suggestions or a solution to how I could make it stop? Thanks in advance!</p>
  
  <pre><code>   // Asks the data source to return a cell to insert in a particular table view location
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
  
      //Gets the current news article
      NewsArticle *theCurrentArticle = [self.listofNewsArticles objectAtIndex:[indexPath row]];
  
      //Gets the title from the current article
      NSString *theTitle = theCurrentArticle.title;
  
      //Gets the image url 
      NSString *imageUrl = theCurrentArticle.imageURL;
  
      //Gets the description of the current news article
      NSString *theDescription = theCurrentArticle.description;
  
  
      NewsCustomCell *cell = (NewsCustomCell *)[tableView dequeueReusableCellWithIdentifier:@"NewsContent"];
  
      __block NewsCustomCell *aCell;
  
       dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
  
      if (cell == nil) {
          aCell = (NewsCustomCell *)[tableView dequeueReusableCellWithIdentifier:@"NewsContent"];
      } else {
          AsyncImageView* oldImage = (AsyncImageView*)
          [cell.contentView viewWithTag:999];
          [oldImage removeFromSuperview];
      }
  
  
  
      AsyncImageView *imageView = [[AsyncImageView alloc] initWithFrame:CGRectMake(5, 5, 100, 100)];
      imageView.tag = 999;
  
            dispatch_async(dispatch_get_main_queue(), ^{
      [imageView loadImageFromURL:[NSURL URLWithString:imageUrl]];
      [cell.contentView addSubview:imageView];
  
                cell.titleLabel.text = theTitle;
                cell.descriptionLabel.text = theDescription;
                cell.imageLabel.contentMode = UIViewContentModeScaleAspectFill;
  
  });
  
           });
  
  
  
      return cell;
  
  
  
  }
  </code></pre>
  
  <p>Heres what the current app looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/JMBLz.png" alt="enter image description here"></p>
  
  <p>Solution: </p>
  
  <p>Just worked with this class I finally found. 
  <a href="https://github.com/rs/SDWebImage" rel="nofollow noreferrer">https://github.com/rs/SDWebImage</a>
  This handles caching, async downloads. Wish I found this sooner..</p>