Here I’m working for static URL.
My Code :
NSURL *url = [[NSURL alloc] initWithString:@"http://cns.bu.edu/~lgrady/diagonal_line_nobreak_seg.jpg"];
NSData *myData = [NSData dataWithContentsOfURL:url];
img.image = [UIImage imageWithData:myData];
So, I can see image in ImageView.
But, While passing internal web-service URL.
And I’m getting data for Image in bytes from url instead of Image like below:
{"AppBanner":"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUg.....VORK5CYII="}
But with help of above code, I can’t convert this data into Image.
So how can I convert this data into image ?
Any Solution ?
Thanks in advance.
Use NSData-Base64 to convert base64 into NSData and then into UIImage