Is there any way to save an image an default.png programmatically on the iphone?

依然范特西╮ 提交于 2019-12-24 01:13:28

问题


I writing an app for the iphone and I would like to save an image from it as the default.png for the next invocation. Is this possible? It seems as if the sandbox doesn't allow you to overwrite anything in its local filesystem.


回答1:


No, you can't. It used to be possible to make Default.png a symbolic link into your Documents folder, then to rewrite the location it pointed to, but functionality was removed in 3.0. You should file a bug with Apple explaining your needs.




回答2:


No you cant, what you can do is save the image data to a file or using core data and then retrieve it for use.

So you can do something like if(dataIsThere) //use that data for image

else

use the default



来源:https://stackoverflow.com/questions/1168109/is-there-any-way-to-save-an-image-an-default-png-programmatically-on-the-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!