Delete row from UITableView NSMutableArray and ManagedObjectContext
I've got the UITableView which is populated from NSMutableArray. 
NSMutableArray was created from my NSFetchedResultsController which came from another view 

 

      Templates *template2 = (Templates *)[fetchedResultsController objectAtIndexPath:indexPath];
            qModalView.templateObject = template2;

and was recorded to templateObject, so I have got all my objects in this my NSMutablArray that way.

[templateObject.questions allObjects];

Now I want to delete row in my table view , in array and in that particular object in templateObject.questions.

Please help, I have this so far:

    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
    {
    	Questions *question_var = [questionsArray objectAtIndex:indexPath.row];
    	
    	NSLog(@"_____________________________%@", question_var.question_title);
    	
    	NSManagedObjectContext *context = [templateObject managedObjectContext];
    	[context deleteObject:[templateObject.questions objectAtIndexPath:indexPath]];
    	
    	NSError *error;
        if (![context save:&error]) {
    
            NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
            abort();
        }else{
    		NSLog(@"deleted");
    	}
    }


Delete row from UITableView NSMutableArray and ManagedObjectContext
===

I've got the UITableView which is populated from NSMutableArray. 
NSMutableArray was created from my NSFetchedResultsController which came from another view 

 

      Templates *template2 = (Templates *)[fetchedResultsController objectAtIndexPath:indexPath];
            qModalView.templateObject = template2;

and was recorded to templateObject, so I have got all my objects in this my NSMutablArray that way.

[templateObject.questions allObjects];

Now I want to delete row in my table view , in array and in that particular object in templateObject.questions.

Please help, I have this so far:

    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
    {
    	Questions *question_var = [questionsArray objectAtIndex:indexPath.row];
    	
    	NSLog(@"_____________________________%@", question_var.question_title);
    	
    	NSManagedObjectContext *context = [templateObject managedObjectContext];
    	[context deleteObject:[templateObject.questions objectAtIndexPath:indexPath]];
    	
    	NSError *error;
        if (![context save:&error]) {
    
            NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
            abort();
        }else{
    		NSLog(@"deleted");
    	}
    }

