2

i'm currently using the UIImagePickerController to allow the user to take a picture which then scales it to 600x800 JPEG and saves it as 4 different qualities (25%, 50%, 75% and 100%). Im trying to find a way in which i can take these images from the documents directory and display them within a table view as thumbnails, which the user can then click on the thumbnail to enlarge the image.

Any help or information would be greatly appreciated.

Thanks!

Fernando
  • 241
  • 3
  • 10

1 Answers1

2
    NSString *path=[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"image"];
    UIImageView *imgView=[[UIImageView alloc] initWithFrame:CGRectMake(0,0,40,40)];
    imgView.image=[UIImage imageWithData:[NSData dataWithContentsOfFile:path]];
    [self.view addSubview:imgView];
Vivek Sehrawat
  • 6,560
  • 2
  • 26
  • 39