I don't know if this is possible but I want to take an RSS feed of photos (from flickr) and display them as a slideshow in a UIImageView. I just wanna know if anyone else has done this and if its possible or not.
I don't know if this is possible but I want to take an RSS feed of photos (from flickr) and display them as a slideshow in a UIImageView. I just wanna know if anyone else has done this and if its possible or not.
Thanks
Yeh, its completely possibly, using the same method in one of my app's, I simply got the RSS feed from flickr, used a couple of string scanners to pick out the URL of the image, once you've got that, you can do whatever you want with them.. which in your case is a slideshow..
I don't know if this is possible but I want to take an RSS feed of photos (from flickr) and display them as a slideshow in a UIImageView. I just wanna know if anyone else has done this and if its possible or not.
Three20 is overkill IMO for such a relatively simple task. If you're not using a couple of Three20 objects, there is a lot of overhead one needs to justify (at least to one's self).
Download the XML File (this code shows downloading an HTML file, but its the same thing for XML - just change the method name). In the connectionDidFinishLoading method, simply initialize the NSXMLParser like this...
Code:
//pass our downloaded data to the parser
parser = [[NSXMLParser alloc] initWithData:data];
[parser setDelegate:self]; // The parser calls methods in this class
[parser setShouldProcessNamespaces:NO];
[parser setShouldReportNamespacePrefixes:NO];
[parser setShouldResolveExternalEntities:NO]; // We just want data, no other stuff
[parser parse]; // Parse that data..
If not using Flickr, what do you suggest? I have a URL for a RSS image Feed. I understand typical text based XML parsing and use it with no problem. I believe it is already async, correct? Anyway, how is a feed of images gone about? Would you store incoming image files to an array, or is it just the URL your are retrieving? Then later using the URL as the path for a UIImage view?
Thanks for any input, I am at work and unable to "Code" so, I'll play with it in a few hours.
I would use the same exact code used to download the XML file to download the images (as soon as that's possible). Once you have your finished NSData, rather than sending it to an NSXMLParser, create an image with it....
Basically, you treat it like a UIImage, but when you initialize it, you also pass an Image URL to it. The Image will show an activity indicator while loading, and once the download is finished, the image appears and the activity indicator goes away. just include JImage.h and JImage.m in your project, add a reference to them, and away you go.