【发布时间】:2017-07-10 15:41:10
【问题描述】:
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;
【问题讨论】:
-
调用该方法时 nslog 打印了什么?
-
它打印 null fof NEW DATA : Null 但 url nslog 正在获取数据???
-
你能上传你的网址让我测试一下吗?
-
您输入的网址是否没有
http://或https://是前缀?你需要http://
标签: objective-c nsdata nsurl