1

I have an an xml file in the web, which contain few image urls (number of urls are changing dynamically) So I want to show that images in a carousel view.

What I'm going to do is, read the xml file and get each image url. Then download the image in to the phone and add them in to a carousel view. Is there any easy or stranded way to do that ?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
enadun
  • 3,107
  • 3
  • 31
  • 34

1 Answers1

2

Since you're using the keyword "carousel", it sounds like you already know about the many open source implementations of Coverflow-like image display.

The trick for your app is that you need to create a data source (e.g. a NSMutableArray) while you are parsing your XML and the iCarousel (or whatever you decide to use) view will draw from that array to display the images.

If this were my app, I'd store custom objects in the data source array which would contain the image URL and, when the object is created, would dispatch an asynchronous thread to download the image (which would then also get stored into that custom object).

Your question was rather broad, and I'm not able to give a super detailed solution since actual code might not be applicable for how you decide to architect your yet-to-be-coded app.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215