Saturday, 15 August 2015

iphone - SDWebImage Cancel download -


I am using SDWebimage to load images on my tableview I am following the tutorial

Now I have a problem, if I scroll down and hits back before loading images, the app crashes. How can I solve it?

How to cancel the SDWebImage download I have gone through some answers and discussions. But none of them could help me and could not use them.

Please help me

I

  [Cell.UserImage setImageWithURL : [NSURL URLWithString: [SDWebArray objectAtIndex: indexPath.row]] Placeholder image: [UIImage imageNamed: @ "placeholder page"]];    

In your cell, you can cancel the image load if it is retrieved Is used, used Add the following to your UITableViewCell subclass:

  - Ready (zero) readyForius {{Super-ReadyForius}; [Cancel self.imageView tool image]; // If you want the picture to cancel loading for UIImageView}   

#import also make sure as "UIImageView + WebCache.h" .

However your app should not be crashing, but without seeing some code I can not help you because it is not possible to find out the cause of the accident due to your details.

No comments:

Post a Comment