iOS Swift-在文档目录中存储uiimage并在核心数据中存储路径 [英] Ios swift - storing uiimage in document directory and path in core data
问题描述
我当前将图像直接存储在核心数据中,并且在必须检索高质量图像时遇到问题.
I'm currently storing my images directly in core data and experiencing issues when having to retrieve a high quality images.
建议我将图像存储在文档目录中,并在核心数据中保存一个路径,以便不要在其中存储实际图像,而只是在我可以找到它的位置存储地址.
I was advised to store the images in the document directory and save a path in core-data as to not store the actual images there but simply the address of where I can go and find it.
有人可以将我推向正确的方向吗?似乎找不到合适的指导?
Can someone push me in the right direction? Can't seem to find the appropriate guidance?
推荐答案
我能够在此youtube视频中找到我所有问题的答案- https://www.youtube.com/watch?v=6vk4UrJR8WM
I was able to find the answers to all my questions in this youtube video - https://www.youtube.com/watch?v=6vk4UrJR8WM
这是github,其中包含有关如何完成此操作的说明的文件- https://github.com/TDAbboud/WeightLogger-Images
This is the github with the file that has instructions as to how to complete this - https://github.com/TDAbboud/WeightLogger-Images
这篇关于iOS Swift-在文档目录中存储uiimage并在核心数据中存储路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!