Please see the below code :
UIImage *image;
NSString *str = [[[Data getInstance]arrPic]objectAtIndex:rowIndex];
NSLog(str);
NSURL *url = [NSURL URLWithString:str];
NSData *data = [NSData dataWithContentsOfURL:url];
image = [UIImage imageWithData:data];
str is giving me http://MyDomain/Pics\\1.png
but url is giving me nil.
Just try using this,
[NSURL URLWithString:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
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