iPhone Development: Get images from RSS feed

Posted by Matthew Saeger on Stack Overflow See other posts from Stack Overflow or by Matthew Saeger
Published on 2010-03-18T21:02:11Z Indexed on 2010/03/19 12:01 UTC
Read the original article Hit count: 365

Filed under:
|

I am using the NSXMLParser to get new RSS stories from a feed and am displaying them in a UITableView. However now I want to take ONLY the images, and display them in a UIScrollView/UIImageView (3 images side-by side). I am completely lost. I am using the following code to obtain 1 image from a URL.

   NSURL *theUrl1=[NSURL URLWithString:@"http://farm3.static.flickr.com/2586/4072164719_0fa5695f59.jpg"];
 JImage *photoImage1=[[JImage alloc] init];
 [photoImage1 setContentMode:UIViewContentModeScaleAspectFill];
 [photoImage1 setFrame:CGRectMake(0, 0, 320, 170)];
 [photoImage1 initWithImageAtURL:theUrl1];
 [imageView1 addSubview:photoImage1];
 [photoImage1 release];

This is all I have accomplished, and it works, for one image, and I have to specify the exact URL. What would you recommend I do to accomplish this?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone