我正在制作一个应用程序,在该应用程序中我使用相机拍摄照片,并且希望将这些照片保存为plist,以便将来可以使用。我也想从plist中检索保存的图像,并在imageview上显示它们。有多种images.Please任何人都可以帮我这个将图像添加到plist
这里是我的代码,我使用的是用于添加到plist中
imageArray addObject:[NSString stringWithFormat:@"%@",imageView.image]];
[imageArray writeToFile:plistPath atomically:YES];
这可是当我试图以检索图像并将其设置在ImageView的我不能看到图像。 谢谢。
为什么??的plist不能将它们保存在沙箱中? – DivineDesert 2013-03-26 12:09:22
如果你想保存plist,将图像转换为nsdata并尝试.. http://stackoverflow.com/a/9758915/344798 – coder284 2013-03-26 12:11:39
http://stackoverflow.com/questions/2486705/storing-image-in -plist和http://stackoverflow.com/questions/10846620/ios-load-image-from-plist-file – iPatel 2013-03-26 12:14:29