Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8414659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:13:20+00:00 2026-06-10T01:13:20+00:00

In my iPhone application, I have a UITableView and this contains a UIImageView, button

  • 0

In my iPhone application, I have a UITableView and this contains a UIImageView, button and Label. I am updating my database as per the values from the server and updating the details in the tableview. If I run the app for second time, after some modification at the server, the imageview is not getting updated. Button and label are updating. When I checked the local path for the image from the database, it shows the new image in the documents folder but the table cell still shows the old one. To the see the updated image, I should reinstall the app. What should I do to fix this issue?

Here is the work flow of what I did:

  1. Loading new values from the database, and keeping all the values in an array
  2. Removing the tableview
  3. Creating the tableview again
  4. Reload tableview.

Edit
//creating custom cell for the table view for displaying different objects

- (UIMenuItemCell *) getCellContentView:(NSString *)cellIdentifier {

    CGRect CellFrame = CGRectMake(0, 0, 150, 60);
    CGRect Label1Frame = CGRectMake(20, 23, 98, 30);
    CGRect imgFrame = CGRectMake(20, 48, 110, 123);
    CGRect btnFrame = CGRectMake(25, 136, 100, 30);

    UILabel *lblTemp;
    UIImageView *itemImg;
    UIButton *itemBtn;

    UIMenuItemCell *cell = [[UIMenuItemCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
    cell.frame = CellFrame;

    //Initialize Label with tag 1.  
    lblTemp = [[UILabel alloc] initWithFrame:Label1Frame];
    lblTemp.tag = 1;
    lblTemp.textColor=[UIColor colorWithRed:139.0f/255.0f green:69.0f/255.0f blue:19.0f/255.0f alpha:1.0f];
    lblTemp.textAlignment = UITextAlignmentCenter;
    lblTemp.backgroundColor = [UIColor clearColor];
    lblTemp.font = [UIFont systemFontOfSize:13.0];
    [cell.contentView addSubview:lblTemp];
    [lblTemp release];

    //Initialize ImageView
    itemImg = [[UIImageView alloc]initWithFrame:imgFrame];
    itemImg.tag = 2;
    [cell.contentView addSubview:itemImg];
    [itemImg release];

    //Initialize Button
    itemBtn = [[UIButton alloc]initWithFrame:btnFrame];
    itemBtn.frame = btnFrame;
    itemBtn.tag = 3;
    itemBtn.titleLabel.textColor = [UIColor blueColor];
    itemBtn.titleLabel.font = [UIFont systemFontOfSize:9.0];
    [cell.contentView addSubview:itemBtn];
    [itemBtn release];


    return cell;
}

// Customize the appearance of table view cells.

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {

        NSString *CellIdentifier = [NSString stringWithFormat:@"Cell%d", indexPath.row];

        UIMenuItemCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];


        if(cell == nil){
            cell = [self getCellContentView:CellIdentifier];

            cell.transform = CGAffineTransformMakeRotation(M_PI_2);
            cell.selectionStyle = UITableViewCellSelectionStyleNone;

            cell.cellItemName = (UILabel *)[cell viewWithTag:1];
            cell.cellitemImage = (UIImageView *)[cell viewWithTag:2];
            cell.cellItemButton = (UIButton *)[cell viewWithTag:3];

            DataBaseClass *itemObj = [appDelegate.itemArray objectAtIndex:indexPath.row];

            NSString *imageLocalFilePath = nil;
            if ([[tempitemStatusArray objectAtIndex:indexPath.row] isEqualToString:@"NotAvailable"]) {
                cell.cellItemProgress.hidden = YES;
                cell.cellItemButton.hidden = NO;
                imageLocalFilePath = [NSString stringWithFormat:@"%@",[tempItemLocalNotAvailPath objectAtIndex:indexPath.row]];
                NSString *date = [self changeDateFormat:itemObj.itemReleaseDate];          
                [cell.cellItemButton setTitle:date forState:UIControlStateNormal]; 
                cell.cellItemButton.userInteractionEnabled = NO;
                cell.userInteractionEnabled = NO;
                [cell.cellItemButton removeTarget:nil action:NULL forControlEvents:UIControlEventAllEvents];
                [cell.cellItemButton setBackgroundImage:[UIImage imageNamed:@"not_available_bttn_bck_img"] forState:UIControlStateNormal];
            }else if ([[tempitemStatusArray objectAtIndex:indexPath.row] isEqualToString:@"Available"]){
                cell.cellItemButton.userInteractionEnabled = YES;
                cell.userInteractionEnabled = YES;
                cell.cellItemProgress.hidden = YES;
                [cell.cellItemButton setTitle:@"" forState:UIControlStateNormal];
                [cell.cellItemButton setBackgroundImage:[UIImage imageNamed:@"available_bttn_img_normal"] forState:UIControlStateNormal];
                [cell.cellItemButton setBackgroundImage:[UIImage imageNamed:@"available_bttn_img_pressed"] forState:UIControlStateHighlighted];
                [cell.cellItemButton removeTarget:nil action:NULL forControlEvents:UIControlEventAllEvents];
                [cell.cellItemButton addTarget:self action:@selector(confirmationAlert:) forControlEvents:UIControlEventTouchUpInside];
                imageLocalFilePath = [NSString stringWithFormat:@"%@",[tempItemLocalAvailPath objectAtIndex:indexPath.row]];
            }
            if ([imageLocalFilePath isEqualToString:@""]) {
                [cell.cellitemImage setImage:[UIImage imageNamed:@"item01.png"]];
            }else {
                [cell.cellitemImage setImageWithURL:[NSURL fileURLWithPath:imageLocalFilePath] placeholderImage:[UIImage imageNamed:@"item01.png"]];
            }        
            cell.cellItemName.text = [NSString stringWithFormat:@"%@",[tempItemNameArray objectAtIndex:indexPath.row]];
        }

        return cell;
    }

Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:13:22+00:00Added an answer on June 10, 2026 at 1:13 am

    I found the issue, in the cellForRowAtIndexPath method, for setting the image, I used the code

    [cell.cellitemImage setImageWithURL:[NSURL fileURLWithPath:imageLocalFilePath] placeholderImage:[UIImage imageNamed:@"item01.png"]];

    I used a external classes calls ImageLoading for loading the images and that classes included some cache methods, and that caused the issue. So I changed that line to

    [cell.cellitemImage setImage:[UIImage imageWithContentsOfFile:imageLocalFilePath]];
    

    that solved the issue.

    Thanks for your support 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPhone application where i download information from the internet and put
I have a UITableView in an iPhone application which I am refreshing (by calling
This is my first iPhone application. So I have this long list of doubts
I am attaching an image. Some of you might have tried this iphone application
I am using UIDatePicker in my iPhone application.I have kept a button on clicking
another weird problem with the iPhone SDK here. I have a UITableView which contains
I have an UITableView with sections in my iPhone application where it looks as
I have one iphone application in which i am adding uitableview inside uitableviewcell.in that
I have an application that has a UITableView. This UITableView is populated by an
I have a reasonably simple split view application adapted from iPhone code. The main

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.