can I check if downloaded image is corrupt or not before saving it into my document directory? if yes then please tell me how? thank you
UIImage *im = [[UIImage alloc] initWithData:YourNSData];
UIImageView *imview;
// test to see if the image was successfully created
if (im){
imview = [[UIImageView alloc] initWithImage:im];
}
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With