Saving data in a table cell

Discussion in 'iOS Programming' started by ljg93, May 31, 2011.

  1. ljg93 macrumors member

    Mar 13, 2011
    Hey everyone,

    I am using code from the PhotoPicker Sample Code. I basically put the photo picker inside of a table view cell so when a user clicks on a cell they can select a photo that goes along with that cell so for example

    First Table View Section-Second Table View Section- Detailed Section (where user can select a photo to be saved on this page)

    I was wondering how I can get the photo selected by the user to be saved in the cell.
  2. bweberapps macrumors member

    Jun 25, 2010
    You could try storing the picture in a core data table using the transformable type, and add a UIImage to Data Transformer class. I found an example in one of Apple's examples, but I can't seem to find it now. Use the core data table to populate your table view. Hope this puts you in the right direction.
  3. seepel macrumors 6502


    Dec 22, 2009
    I would caution against storing binary data in Core Data. I tried this once thinking "How much slower can it make my database?" Well it gets pretty darned slow. It'd be better to store the name of the image in the Core Data database and then write the image to disk.

Share This Page