开发者

Core Data and image entities

I'm new to Core Data. I'm creating an app that will allow a user to add a document importing/exporting from/to either Dropbox, Mail (haven't figured that out), or the camera or photo library.

I see in CoreDataRecipes that Apple creating an entity for image and have a relationship to recipes. And their PhotoPicker app the camera part is a little ridiculous in my opinion. Cool but not practical. Plus they're not using Core Data.

I just 开发者_如何学编程have a table view, an add button at the top, the user will be prompted to choose any of the options mentioned, add a title, and that title added to the table view. Hope all that is clear, I'm trying to be brief. In a way I want to do this part of the app like a scanner app.

So my question is, do I really need to create an entity for the image? Or can I just go about figuring how to do all this?

Thanks in advance for any help or info you can provide.


In my case, I kept the images out of sql store altogether and just saved the images in the application's /Cache folder. I then stored a filename in my entity in core data which allowed me to access the image.


Below 1MB do with it whatever you like. Beyond 1MB you should put the binary data on a separate table. What you get doing this is lazy loading, that is, the data remains at fault until the user needs it. It also depends on your memory usage and number of images, this part is only common sense.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜