问题
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