title: My UITableViewCell is reusing a previous cells UIImage
body: <p>I have a UITable that reuses cells. Each cell has an image dependant on a condition. The correct images are always used however when cells are reused the old image is displayed behind the new one. I have tried to remove the uiimageview before adding a new subview however it has no effect.</p>
  
  <pre><code>-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
      static NSString *simpTableIden = @"simpTableIden";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpTableIden];
  
      if (cell == nil) {
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpTableIden];
  
      }
  
      NSUInteger row = [indexPath row];
  
      cell.textLabel.text = [[self.achievements objectForKey:[keys objectAtIndex:row]] objectForKey:@"name"];
  
      CGRect picFrame = CGRectMake(cell.frame.size.width-cell.frame.size.height, 0,   cell.frame.size.height, cell.frame.size.height);
  
      UIImage *greyDot = [UIImage imageNamed:@"greyDot.png"];
      UIImage *whiteDot = [UIImage imageNamed:@"whiteDot.png"];
      UIImageView *achievImg = [[UIImageView alloc] init];
  
      tableView.backgroundColor = [UIColor clearColor];
  
      achievImg.frame=picFrame;
  
      if ([[[self.achievements objectForKey:[keys objectAtIndex:row]] objectForKey:@"achieved"] boolValue]) {
  
          achievImg.image = whiteDot;
      }
      else {
         achievImg.image = greyDot;
      }
  
      [achievImg removeFromSuperview];
      [cell.contentView addSubview:achievImg];
  
      return cell;
   }
  </code></pre>
  
  <p>Any help would be greatly appreciated?</p>