我正在从我的OSX应用程序创建一个包含一些图片的plist。我正在通过以下方式编写图像:
[NSKeyedArchiver archivedDataWithRootObject:self.someImage]
然后我正在将这个plist文件用作iOS应用程序的模板,但是我无法将该文件转换为UIImage
,也无法将其转换为NSImage
(因为这仅适用于OSX)。我得到了这个错误:
请建议一种执行上述操作的方法。* Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '* -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSImage)'
TIFFRepresentation
。 - Keith Smiley