Quantcast
Channel: Hydrate table using RSS feed data Objective C - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Hydrate table using RSS feed data Objective C

$
0
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.


Viewing all articles
Browse latest Browse all 2

Trending Articles