1

I have an image view where I am displaying an image from an URL.I am using SDWebImage Framework,the image is getting displayed in the imageview after it has completed downloading. I want to make it appear that the image is getting downloaded over the placeholder image that i am using,just like a webview loads a NSURLRequest.Is there any way to do that?

This is where im loading the image:

[myImageView setImageWithURL:[NSURL URLWithString:[[tempUrls objectAtIndex:0] objectAtIndex:0]] placeholderImage:[UIImage imageNamed:@"thumbnail404.png"]];

Rajarshi
  • 381
  • 3
  • 10
  • I don't understand this part: "I want to make it appear that the image is getting downloaded over the placeholder image that i am using,just like a webview loads a NSURLRequest" – slf Jun 24 '13 at 13:00
  • You can try to create an `UIImage` instance with partially loaded data, you should expect a large memory usage though. – A-Live Jun 24 '13 at 13:38
  • What i meant is,a webview loads a url displaying it bit by bit..so when a request starts,the user can see that the url is loading and the page is slowly getting displayed,(well i work on a slow connection so it appears like that).whereas in my case,as soon as the compiler reaches the line of code given above.. – Rajarshi Jun 24 '13 at 16:26
  • it places the placeholder image in the imageview and then it takes about 20-30 odd seconds,when the user can only see the placeholder image and is not aware that the request is getting loaded after which the main image gets displayed as a whole(again as i work on a slow connection and its high resolution processed image).i just want to make sure that as soon as the request is made,the user can see that the required image is appearing. @slf – Rajarshi Jun 24 '13 at 16:27
  • Thanks @A-Live But that would be a workaround in my api as im not handling that data.the image that im displaying is already processed in s3 bucket and im only getting the final image. – Rajarshi Jun 24 '13 at 16:31
  • Well, you obviously can't display the image "bit by bit" if you are "only getting the final image". – A-Live Jun 24 '13 at 17:09

0 Answers0