How to make an UIImageView remember

Discussion in 'iOS Programming' started by mguniverse, Jan 24, 2010.

  1. mguniverse, Jan 24, 2010
    Last edited: Sep 5, 2011

    mguniverse macrumors newbie

    Joined:
    Jan 24, 2010
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Look into using NSUserDefaults for this kind of data persistence.
     
  3. mguniverse thread starter macrumors newbie

    Joined:
    Jan 24, 2010
    #3

    But how do I implement that with image views?
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    UIImageView conforms to NSCoding.
     
  5. drf1229 macrumors regular

    drf1229

    Joined:
    Jun 22, 2009
    #5
    Try converting the image to NSData, then write the data to a file.
     
  6. mguniverse thread starter macrumors newbie

    Joined:
    Jan 24, 2010
    #6
    How do I go about doing that?
     
  7. drf1229 macrumors regular

    drf1229

    Joined:
    Jun 22, 2009
    #7

Share This Page