You use reusable cells, so when cell hide outside the bounds, it's reuse for display another data. Quick fix:
- (ITAlbumTableCellView *)makeTableCellViewWithAlbum:(ITLibAlbum *)album {
ITAlbumTableCellView *cellView = (ITAlbumTableCellView *)[self makeTableCellViewWithIdentifier:kTCVIAlbum];
static int tag = 0;
tag++;
int tagForBlock = tag;
cellView.tag = tag;
if (![self._imageCache objectForKey:album]) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSImage *artwork = album.artwork;
if (!artwork || !artwork.isValid) artwork = [NSImage imageNamed:@"noArtwork"];
[self._imageCache setObject:artwork forKey:album];
dispatch_async(dispatch_get_main_queue(), ^{
if(tagForBlock != cellView.tag)
return;
NSTableCellView *tcv = [self.tableView viewAtColumn:0 row:[self.tableContent indexOfObject:album] makeIfNecessary:NO];
tcv.imageView.image = artwork;
});
});
} else {
cellView.imageView.image = [self._imageCache objectForKey:album];
}
return cellView;
}