我有一个CoreData实体,它有一个UIImage属性,类型为“二进制数据”,它应该包含一个代表uiImage的数据对象。在确保图像是正确的映像之前,我将在CoreData中保存该映像,但使用预览按钮进行调试和查看:我就是这样在CoreData中保存图像的let uiImage = ... // The image t
我已经添加了向现有的添加图像的功能,该功能使用CoreData和CloudKit来保存和同步跨设备的数据。由于图像很大,所以我将图像存储在documents目录中,并将文件名保存在CoreData中。save image data to documents directory
......
// then I store the "imageName" to CoreDataImage(uiImage: