Reputation:
im using the sdwebImage library to download images in tableview cell and display them. the images are high resolution images. when the app launches, and starts loading, it suddenly crashes, without giving any errors, except sometime giving "received memory warning", and then the app crashes, its running on the simulator normally, but on an ipad, it is crashing, the code where im putting the image in the cell:
- (void)setCellWithImage:(NSString *)imageURL
{
if (imageURL && [imageURL length]) {
[self.testingImageView sd_setImageWithURL:[NSURL URLWithString:imageURL]
placeholderImage:[UIImage imageNamed:@"ic_launcher"]];
}
}
any idea how to solve this issue?
Upvotes: 0
Views: 28
Reputation: 2092
I will suggest you to show in tableview use low quality image. Get two image paths one for low quality image and another for high quality image. Show low quality image in Tableview and on click of particular image show high quality image.
There is only difference between simulator and phone is, Simulator doesnt have memory so on simulator this issue will not replicate.
Upvotes: 0