I have looked everywhere on the internet and I havent found a single solution for me. In my app, I have a tableview and users add there own cells. In the detail view, there is a UIImageView and a place where the can take a picture. I need t o be able to save that image in the app somewhere and then after they save it, they can click the cell later on and it will show that image they took a while back.
Here is the code for the table view cell and tableview:
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath      {   
if (indexPath.row == 0) // Don't move the first row
    return NO;
return YES;
}
-(void)tableView:(UITableView *)tableView setEditing:(BOOL)editing animated:(BOOL) animated {
[super setEditing:editing animated:animated];
[tableView setEditing:editing animated:animated];
NSLog(@"EDIT BUTTON WILL BEGIN EDITING");
if (editing) {
    [self.tableView setEditing:YES animated:YES];
} else {
    [self.tableView setEditing:NO animated:YES];
}
[tableView reloadData];
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
NSManagedObjectContext *context = [self managedObjectContext];
if (editingStyle == UITableViewCellEditingStyleDelete) {
    // Delete object from database
    [context deleteObject:[self.devices objectAtIndex:indexPath.row]];
    NSError *error = nil;
    if (![context save:&error]) {
        NSLog(@"Can't Delete! %@ %@", error, [error localizedDescription]);
        return;
    }
    // Remove device from table view
    [WTStatusBar setStatusText:@"Removed" timeout:0.7 animated:YES];
    [self.devices removeObjectAtIndex:indexPath.row];
    [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
}
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return _devices.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
    [cell.textLabel setTextColor:[UIColor grayColor]];
    [cell.textLabel setHighlightedTextColor:[UIColor whiteColor]];
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
NSManagedObject *device = [self.devices objectAtIndex:indexPath.row];
[cell.textLabel setText:[NSString stringWithFormat:@"%@", [device valueForKey:@"name"]]];
[cell.detailTextLabel setText:[device valueForKey:@"company"]];
[cell.textLabel setBackgroundColor:[UIColor clearColor]];
[cell.detailTextLabel setBackgroundColor:[UIColor clearColor]];
[cell setSelectionStyle:UITableViewCellSelectionStyleGray];
cell.backgroundView = [[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"TableViewCell.png"] stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0]];
return cell;
}
- (NSManagedObjectContext *)managedObjectContext
{
NSManagedObjectContext *context = nil;
id delegate = [[UIApplication sharedApplication] delegate];
if ([delegate performSelector:@selector(managedObjectContext)]) {
    context = [delegate managedObjectContext];
}
    return context;
}
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath{
id ob = [_devices objectAtIndex:destinationIndexPath.row];
[_devices replaceObjectAtIndex:destinationIndexPath.row withObject:[_devices objectAtIndex:sourceIndexPath.row]];
[_devices replaceObjectAtIndex:sourceIndexPath.row withObject:ob];
}
Here is the code for saving it to the tableview:
- (IBAction)save:(id)sender {
    NSManagedObjectContext *context = [self managedObjectContext];
    UIImage *image = resultImage.image;
    NSData *imageData = UIImagePNGRepresentation(image); //convert image into .png format.
    NSFileManager *fileManager = [NSFileManager defaultManager];//create instance of NSFileManager
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); //create an array and store result of our search for the documents directory in it
    NSString *documentsDirectory = [paths objectAtIndex:0]; //create NSString object, that holds our exact path to the documents directory
    NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"/%@KYRO Receipts Images/Barcode.png", resultImage]]; //add our image to the path
    [fileManager createFileAtPath:fullPath contents:imageData attributes:nil]; //finally save the path (image)
    NSLog(@"image saved");
    if (self.device) {
        // Update existing device
        [self.device setValue:self.nameOfItem.text forKey:@"name"];
        [self.device setValue:self.dateOfPurchase.text forKey:@"date"];
        [self.device setValue:self.companyOfItem.text forKey:@"company"];
    } else {
       // 
        NSManagedObject *newDevice = [NSEntityDescription insertNewObjectForEntityForName:@"Receipt" inManagedObjectContext:context];
        [newDevice setValue:self.nameOfItem.text forKey:@"name"];
        [newDevice setValue:self.dateOfPurchase.text forKey:@"date"];
        [newDevice setValue:self.companyOfItem.text forKey:@"company"];
    }
    NSError *error = nil;
    // Save the object to persistent store
    if (![context save:&error]) {
        NSLog(@"Can't Save! %@ %@", error, [error localizedDescription]);
    }
    [WTStatusBar setStatusText:@"Saving data..." animated:YES];
    [self performSelector:@selector(setTextStatusProgress3) withObject:nil afterDelay:0.1];
        [self.navigationController popViewControllerAnimated:YES];
    [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}