I am not able to remove image cache which are cached by SDWebImage. I am using "UIImageView+UIActivityIndicatorForSDWebImage.h" I am caching image with this code.
[cell.imageView setImageWithURL:url placeholderImage:[UIImage imageNamed:@"image_icon.png"] usingActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
Now sometime i want to remove cache of image because sometime same url will give me another image by server.
I am removing image cache using this code.
[[SDImageCache sharedImageCache] removeImageForKey:[self.imgArray objectAtIndex:indexForDelete] fromDisk:YES];
But is give's me error like:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM UTF8String]: unrecognized selector sent to instance 0x7fcb01f9bf70'
How to remove cache ??