无法从nsurl获取数据

时间:2017-02-21 06:28:50

标签: objective-c nsdata 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;

1 个答案:

答案 0 :(得分:0)

enter image description here

enter image description here

我认为我遇到了您的问题,请在我的项目中查看我的上传图片。

我还制作了一个关于如何在项目中添加此设置的gif,只需按照我的gif中的步骤进行操作。

enter image description here

相关问题