0

I am loading images using the JSON.

But it makes app slow as it use to wait until all images are downloaded in app.

To avoid this situation I want to put some default image. And when app downloads image it should replace that default image.

I am not using table view. I am displaying this images in coverflow.

How do I get this ?

Devang
  • 11,258
  • 13
  • 62
  • 100

4 Answers4

0

This sample demonstrates a multi-stage approach to loading and displaying a UITableView. It begins by loading the relevant text from an RSS feed so the table can load as quickly as possible, and then downloads the images for each row asynchronously so the UI is more responsive.

http://developer.apple.com/library/ios/#samplecode/LazyTableImages/Introduction/Intro.html

Rakesh Bhatt
  • 4,606
  • 3
  • 25
  • 38
0

check out Web Image https://github.com/rs/SDWebImage/

it has:

setImageWithURL:placeholderImage: 

method which you can use like:

 [imageview setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
           placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
Deniz Mert Edincik
  • 4,336
  • 22
  • 24
0

Also check out TTImageView from the Three20 library.

TomL
  • 759
  • 8
  • 20
0

Set the property

photoView.defaultImage = defaultImage;

defaultImage(on right ) is the UIImage

Rahul Chavan
  • 480
  • 3
  • 6