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

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer A key is what you use to access an object… May 11, 2026 at 11:38 pm
  • Editorial Team
    Editorial Team added an answer If you are using them all over, you can store… May 11, 2026 at 11:38 pm
  • Editorial Team
    Editorial Team added an answer If its just for quick testing or whatever, you could… May 11, 2026 at 11:38 pm

Related Questions

This is on iPhone 0S 2.0. Answers for 2.1 are fine too, though I
I am creating a custom WPF control that let's say for simplicity sake has
I am creating a custom control using C# GDI+. Quick explanation...the control will be
I am creating a custom Attribute (extending System.Attribute). I know I can put it

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.