【发布时间】:2013-12-19 12:26:51
【问题描述】:
处理 JSON 数据并从字典中提取图像并将图像添加到数组中
NSURL *imageurl=[NSURL URLWithString:(NSString *) Dictionry[@"product"][@"image_medium_url"]];
NSData *data = [NSData dataWithContentsOfURL:imageurl];
UIImage *image = [UIImage imageWithData:data];
[self.productImageArray addObject:image];
并将这个数组复制到另一个数组
for(int i=0;i<prodReq.productNameArray.count;i++)
{
[productimageA addObject:[[prodReq.productImageArray objectAtIndex:i] mutableCopy]];
}
并将图像设置为图像视图
UIImageView *productimage=[[UIImageView alloc]initWithFrame:CGRectMake(15, prodimgY, 60, 75 )];
productimage.image=[productimageA objectAtIndex:indexPath.row];
当我运行项目时出现此错误
-[UIImage mutableCopyWithZone:]: unrecognized selector sent to instance 0x14581240
可能出了什么问题?
【问题讨论】:
标签: ios objective-c uiimage