如何在NSDictionary中存储UIImage? [英] How can I store a UIImage in an NSDictionary?
本文介绍了如何在NSDictionary中存储UIImage?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在NSDictionary中存储UIImage?
How can I store a UIImage in an NSDictionary?
推荐答案
是的,你可以:
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:1];
UIImage *img = ...;
[dict setObject:img forKey:@"aKeyForYourImage"];
UIImage *imgAgain = [dict objectForKey:@"aKeyForYourImage"];
这篇关于如何在NSDictionary中存储UIImage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文