【发布时间】:2016-05-24 08:50:20
【问题描述】:
我搜索得越来越多,但没有找到完美的解决方案。 我已将图像保存在字典中。
@{
......
@"PrdImg":[UIImage imageNamed:[image objectAtIndex:indexPath.row]
......
};
图像数据完美保存。我检查了它。 但是当我想从字典中获取这些数据时,就会遇到异常。检索代码如下。
PoctImage.image = [UIImage imageNamed:PrdDetailsDic[@"PrdImg"]];
遇到的异常是——
'NSInvalidArgumentException',原因:'-[UIImage length]: unrecognized selector sent to instance 0x7f9428e4e930'
我还阅读了有关异常的更多文档。但没有得到具体的解决方案。
现在我想知道如何从字典中获取图像数据。从字典中获取图像的具体语法是什么。
【问题讨论】:
标签: ios objective-c image uiimage nsdictionary