CoreData (for iphone) storing images

后端 未结 4 693
旧时难觅i
旧时难觅i 2020-12-08 08:55

i wonder if its a wise choice to store images with core data into binary property

say i have a collection of movies and i want to save the image dvd cover into a pro

4条回答
  •  清歌不尽
    2020-12-08 09:19

    It occurred to me that you can use another approach which might be better if you're already subclassing NSManagedObject for your movie entity.

    You can implement the didSave or willSave method on the NSManagedObject and check isDeleted property. If it is deleted, delete the image from disk.

提交回复
热议问题