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

  • Home
  • SEARCH
  • 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 125627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:11:20+00:00 2026-05-11T05:11:20+00:00

I am creating a custom UITableViewCell to include an UIImageView and some related text.

  • 0

I am creating a custom UITableViewCell to include an UIImageView and some related text. I am getting the images from the Internet and while the images load, I display a temporary UIImage.

I am using a separate thread to get the UIImage. Once an UIImage is downloaded, I am firing a method on the main thread to set the image in the UIImageView (getting the instance of UIImageView using tags)

But whatever I do, the images are not changed. The cells still display older images (corresponding to different row – due to reusing of cells) and new images are not reflected. Log statements show that the method to set the image is being called.

I even tried changing the image to a static image in willDisplayCell:forRowAtIndexPath: but even then the image does not change.

Edit
I tried calling reloadData on the UITableView after changing the UIImage, but the UIImage still does not change.

Here’s the relevant piece of code

cellForRowAtIndexPath

        image = [imagesArray valueForKey:[NSString stringWithFormat:@'%i',indexPath.row]];         if(image == nil){             //display temporary images. When scrolling stops, detach new thread to get images for rows visible             NSString *pth = [[NSBundle mainBundle] pathForResource:@'folder' ofType:@'png'];             image = [UIImage imageWithContentsOfFile:pth];             [imgView setImage:image];         }         else{             [imgView setImage:image];         } 

Method which is called on the main thread after an image is downloaded

-(void)setImageInArray:(NSIndexPath *)indPath{     [filesTable reloadData]; } 

In the thread, I am adding the UIImage object to imagesArray. So when the next time the cellForRowAtIndex method is called on reloadData, the new UIImage should be displayed.

  • 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. 2026-05-11T05:11:21+00:00Added an answer on May 11, 2026 at 5:11 am

    UITableView’s cells are cached, so modifying the cell after it has been rendered will have no effect. Try sending the table a reloadData message, after updating the UIImageView.

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

Sidebar

Related Questions

In WPF, we are creating custom controls that inherit from button with completely drawn-from-scratch
I'm creating some custom work items in TFS and the helptext field seems handy
I'm creating a custom subclass of NSPopUpButton and NSPopUpButtonCell to display a lone icon
I am creating a custom UITableViewCell with UILabel inside. When I am setting too
I am creating a custom UITableViewCell class in my iPhone app, but I am
I'm creating custom UITableViewCells using the approach outlined on this page: http://icodeblog.com/2009/05/24/custom-uitableviewcell-using-interface-builder/ So my
Hopefully a quick one? I am creating a custom uitableviewcell and have added an
i am creating a Custom reusable UITableViewCell with Three labels and one imageView,and i
Does anybody know of a method for creating custom Performance Counters using ordinary unmanaged
I am just learning about app.config in respect of creating custom sections. I have

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.