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 6597067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:09:38+00:00 2026-05-25T18:09:38+00:00

Hihi all, I have implement a mechanism for the above (in the question title),

  • 0

Hihi all,

I have implement a mechanism for the above (in the question title), this is how it works:

  1. Create an NSURLConnection and make a call to my json webservice to get a list of records with the image URL for each of the record.
  2. In the connectionDidFinishLoading delegate, I set the returned records to my NSArray and reload my UITableView with the NSArray, but I don’t load the image at this point.
  3. In the same connectionDidFinishLoading delegate, for each of the retrieved record, I fire off separate connection to get the image data. Imagine I have 5 records returned from the previous json webservice, I will fire off 5 GET requests to get my image data for each of the records.
  4. Then this time round, in the connectionDidFinishLoading delegate, I will know this time it is fired from the request of getting image data, I will set the image data into my NSArray of my UITableView datasource and do a reloadData. For 5 records, the table will be reloaded 5 times.
  5. Everything seems working fine only if I do not reload the last 2 elements of my NSArray, otherwise, I will hit the exc_bad_access exception.

Appreciate your kind advice. This might be a foolish way of doing thing.

🙂

  • 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-05-25T18:09:39+00:00Added an answer on May 25, 2026 at 6:09 pm

    The way you describe what you are doing seems OK. You could be using reloadRowsAtIndexPaths to just update each cell as its image is received rather than the whole table.

    Here’s a stack overflow question that may be helpful. Searching for lazy loading will get you plenty more examples.

    I think using Core Data is the right way to do this because it lets you use a NSFetchedResultsController to handle all the table maintenance for you. Initially you load a table with objects that have a nil image path attribute so your cellForRowAtIndexPath can display a placeholder (or nothing). When you get a returned image (asynchronously) you write the image to local storage and update Core Data with the path for the image that should be displayed for that record. When you make a change to core data you do a performFetch on the fetched results controller and your table is displayed correctly. If you follow Apple’s sample code you don’t even need a reloadData on the table.

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

Sidebar

Related Questions

Hihi all, This could very well be a silly question. I would like to
Hihi all, I am pretty new in iPhone dev. I have follow some tutorial
hihi i have a question that i want to ask about c# and window
Hihi all, I have an NSMutableArray containing various NSDictionary. In each of the NSDictionary,
Hihi all, I have a fixed row tableView with several TextFields in it for
Hihi all, I have a TextField (the TextField is added into the TableViewCell from
Hihi all, I am trying to make use of tabbar control in my iphone
I have the following HTML: <html> <head> <title> Think in a NEW BOX. </title>
Can anybody tell me how are exceptions handled in PHP? I have this code
I am wondering why $(this) does not work after a jQuery ajax call. My

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.