Loading an image saved to the Documents Directory only works once, then never loads again

前端 未结 1 1236
轮回少年
轮回少年 2021-01-16 19:52

I am writing an app where the user chooses images to use in the app, which will be saved and then loaded into a table view. I am saving the data of the image to the document

相关标签:
1条回答
  • 2021-01-16 20:11

    Never store a full path. An app's sandbox changes over time. Just store the file name. When you want to get the full path to the file, calculate it at runtime based on the stored filename and the current value for the Documents folder.

    0 讨论(0)
提交回复
热议问题