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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:26:22+00:00 2026-05-28T04:26:22+00:00

I have an Objective C application that reads data from an RSS feed using

  • 0

I have an Objective C application that reads data from an RSS feed using ASIHTTPRequest and parses it using GDataXML. There are two pieces of the RSS data returned that I’d like to display in a table. Each item returned in the RSS feed has a image URL and a description. I’d like to populate the table with the image in one cell and the description in the next cell to the right of the image. My current logic is looping over each item returned from the RSS feed and populating a UIImage object using the following logic:

UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://www.example.com/image.png"]]];
cell.image = [UIImage imageWithData: image];

This works, but seems to run very slowly. Sometimes the application just freezes while trying to load the pictures. Is there a more optimal way to load the images in the table? If I ignore the images, the table populates with the text data quickly.

  • 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-28T04:26:22+00:00Added an answer on May 28, 2026 at 4:26 am
    UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://www.example.com/image.png"]]];
    

    In the above line of code, NSURL URLWithString: is to use with file system URL like already downloaded image in your temp directory or plist file etc. Since you have passed a http URL it makes synchronous request blocking your thread until it finishes downloading image data. And if you are doing this on main thread then UI doesn’t respond to touches until image gets downloaded.

    Change it to make asynchronous call, i.e., download example.com/image.png asynchronously. You may refer to ASIHTTPRequest instance method startAsynchronous and then pass downloaded data to UIImage imageWithData:

    To learn more about asynchronous network requests, watch session 208 WWDC 2010 Network Apps for iPhone OS Part-2

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

Sidebar

Related Questions

I have an objective-c application for OS X that compares two sqlite DB's and
I currently have a WinForms application that downloads large amounts of data from a
I have a 64-bit-only application that I am developing in Objective-C on Cocoa. It
Possible Duplicate: How does @synchronized lock/unlock in Objective-C? I have an application that creates
I have an Objective-C/C++ application which uses functionality that is provided by a C++
I have a native objective c ios application that I would like to convert
I have two pages, the parent and from this page I am using: window.open('OrderDetailsFull.aspx?ObjectID='
I have a Rails application that lists information about local services. My objectives for
We have a collection of commercial MFC/C++ applications which we sell using Stingray Objective
I have some Objective-C code that looks like this: #define myVar 10 float f

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.