Cell with Image not refreshing

I am writing to learn more about possible reasons why a cell, containing an image, within a UITableView does not refresh after call to reloadData; rest of row, which contain labels, updates with new data after call to reloadData;

Working with a UIPickerView containing two options - default data of UITableView is first option of UIPickerView; if second option of UIPickerView is selected, each row updates, refreshes OK;

However, column containing images does not update, refresh - and images remain from initial loading of data; working in debug mode of Objective-C, inside of method cellForRowAtIndexPath - image URLs, to be assigned to cells of UITableView, are available and returned from array;
Answered by robhelle in 669081022
Issue was related to cache of images; below method resolves issue of loading previous, cached images;

Converting image URLs to images in application slows down process of scrolling thru damage items of UI Table View:

However - now images are available for each condition report; 
  • (void)loadDamageItemImage:(NSString *)vin imageURL:(NSURL *)url

{
NSURL *damageImage;
damageImage = saveImageDI;
NSData *data = [NSData dataWithContentsOfURL:damageImage];
UIImage *image = [UIImage imageWithData:data];
if (image) {
[self setImage:image];
[self alertFinishedLoadingImage:image];
return;
}
}
(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{

    NSInteger rowTest;
rowTest = [pickerView selectedRowInComponent:0];
NSString *inStr = [NSString stringWithFormat: @"%ld", (long)rowTest];
testPickSelectNew = [NSString stringWithFormat: @"%ld", (long)rowTest];

    NSArray *checkAuctionVCR = [VehicleData valueForKey:@"AuctionVCR.AuctionVCR"];

if ([testPickSelectNew isEqual: @"1"])
{
[self removePicker];
self.locationPersonDate.text = [dataArray objectAtIndex:row];
[self.vcrDamagesTable reloadData];
[self calculateTotalLabels];
eventAddress = @"";
self.locationPersonDate.text = @"";
[self loadEventInfo];
// _vcrDamagesTable.dataSource = nil;
}
else if ([testPickSelectNew isEqual: @"2"])
{
[self removePicker];
self.locationPersonDate.text = [dataArray objectAtIndex:row];
[self.vcrDamagesTable reloadData];
[self calculateTotalLabels];
eventAddress = @"";
self.locationPersonDate.text = @"";
[self loadEventInfo];
// _vcrDamagesTable.dataSource = nil;
}
}

(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (tableView == self.vcrDamagesTable)
{
VCRCell *vcrCell = [tableView dequeueReusableCellWithIdentifier:vcrDamagesTableViewCellIdentifier];

  if (!vcrCell) vcrCell = [[VCRCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:vcrDamagesTableViewCellIdentifier];
if (!(indexPath.row < [VehicleData vcrDamageItems].count)) return [UITableViewCell new]; 

      NSDictionary *vcrDamageData = [VehicleData vcrDamageItems][indexPath.row];

// Hacking the existing method to cache additional images for VCR by creating a new VIN
        vcrCell.cellVIN = [[VehicleData vin] stringByAppendingString:[NSNumber numberWithInteger:indexPath.row].stringValue];

        vcrCell.imageURL = [NSURL URLWithString:vcrDamageData[@"PhotoURL"]];
        [vcrCell.damagePhoto setImage:nil];
[vcrCell.damagePhoto loadVehicleImageForVIN:vcrCell.cellVIN imageURL:vcrCell.imageURL];

[vcrCell.damagePhoto setBackgroundColor:(vcrCell.imageURL.path.length? [UIColor colorWithWhite:0.75 alpha:0.5] : [UIColor clearColor])];

 vcrCell.damageItem.text             = vcrDamageData[@"DamageItem"];
        vcrCell.damageDescription.text      = vcrDamageData[@"Description"];
        vcrCell.partsCost.text              = [vcrDamageData[@"Parts"] currency];
        vcrCell.laborCost.text              = [vcrDamageData[@"Labor"] currency];
        vcrCell.laborHours.text             = vcrDamageData[@"Hours"];
        vcrCell.estimate.text               = [vcrDamageData[@"Estimate"] currency];
Code Block
[vcrCell setBackgroundColor:[UIColor colorWithWhite:1.00f alpha:0.50f]];

        vcrCell.delegate = self;

         return vcrCell;
}
 return [UITableViewCell new];
}
Accepted Answer
Issue was related to cache of images; below method resolves issue of loading previous, cached images;

Converting image URLs to images in application slows down process of scrolling thru damage items of UI Table View:

However - now images are available for each condition report; 
  • (void)loadDamageItemImage:(NSString *)vin imageURL:(NSURL *)url

{
NSURL *damageImage;
damageImage = saveImageDI;
NSData *data = [NSData dataWithContentsOfURL:damageImage];
UIImage *image = [UIImage imageWithData:data];
if (image) {
[self setImage:image];
[self alertFinishedLoadingImage:image];
return;
}
}
Cell with Image not refreshing
 
 
Q