1

When I use HJCache in a UITableView, images are overlapping while scrolling up and down, so the images overlap while new cells are being loaded. The next cell already contains an image, and then you can see it's loading an image and it gets placed on top of it.

My code:

HJManagedImageV *asyncImage = [[[HJManagedImageV alloc] initWithFrame:CGRectMake(0,0,90,65)] autorelease];
asyncImage.url = [NSURL URLWithString:[ar objectAtIndex:0]];
[imgMan manage:asyncImage]; [cell.contentView addSubview:asyncImage];
JOM
  • 8,139
  • 6
  • 78
  • 111
MaikelS
  • 1,309
  • 4
  • 16
  • 33

1 Answers1

0

I would guess this is a problem in cell reuse, rather than using HJCache. You could verify that by removing (disabling) HJCache and using hardcoded built-in images.

If you do [cell.contentView addSubview:asyncImage] at any point and that specific cell gets reused, then you need to either reuse the asyncImage or remove it and add a new one.

JOM
  • 8,139
  • 6
  • 78
  • 111