title: Storing array of images in CoreData
body: <p>I am trying to store array of images in CoreData. I know that the best way is to store images in app's directory and store links to them in CD, but I don't want to completely reorganise my app and keep storing the binary data in CD.</p>
  
  <p>I've figured out how to store single image:
  In xcdatamodeld I've created <code>thumbnailImageData</code> of binary type.
  In my .h I show it as UIImage type:</p>
  
  <pre><code>@property (nonatomic, retain, readonly) UIImage* thumbnailImage;
  </code></pre>
  
  <p>and in .m I've declared <code>thumbanilImageData</code> and set <code>thumbnailImage</code> as dynamic and reformated thumbnailImage to binary in getter and setter:</p>
  
  <pre><code>@implementation galleryItem {
      NSData* thumbnailImageData;
  }
  
  @dynamic thumbnailImage;
  
  -(UIImage *)thumbnailImage {
      UIImage* returnThumbnailImage = [UIImage imageWithData:thumbnailImageData];
      return returnThumbnailImage;
  }
  
  - (void)setThumbnailImage:(UIImage *)thumbnailImage {
      thumbnailImageData = UIImagePNGRepresentation(thumbnailImage);
  }
  </code></pre>
  
  <p>How can I do the same thing to store/set/get array of images?</p>