如何从xml文件读取图像?

问题描述:

如何在xcode项目中读取xml文件中的图像? 我们是如何在iphone中显示该图片的?如何从xml文件读取图像?

使用NSCoding,您将UIImage转换为NSData。然后,将NSData对象添加到数组或NSDictionary,最后将该NSDictionary保存到磁盘。或者你想要用XML文件做什么。

+0

如何使用NSCoding? – Anand 2011-03-10 09:17:43

+0

@ user593344 http://developer.apple.com/library/ios/#documentation/cocoa/reference/foundation/Classes/NSKeyedArchiver_Class/Reference/Reference.html – 2011-03-10 17:30:03

+0

@AntwanvanHoudt您可以提供一些示例代码。 – 2012-10-06 07:35:55