Search code examples
objective-cnsdatansurl

Unable to fetch data from nsurl


NSURL *url = [NSURL URLWithString:[self.imageArray objectAtIndex:indexPath.row]];
NSLog(@"My URL : %@",url);

NSData *data = [NSData dataWithContentsOfURL:url];
NSLog(@"New Data : %@",data);

UIImage *tmpImage = [[UIImage alloc] initWithData:data];

cell.imageView.image = tmpImage;

Solution

  • enter image description here

    enter image description here

    i think i got your problem, check this like my upload image in your project.

    i also make a gif about how to add this setting in your project , just follow the step in my gif.

    enter image description here