The problem is that your accessory and your ivar have the same name. Where the convention from Ibar comes from. Here you do not use accessor to access the property, you use direct backup directly, so it is never initialized. Instead, make sure you always use your access methods and you will not have a problem. So, rewrite the insult method (and any others that use the property managedContextObject, with something like the following:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
NSManagedObjectContext* context = [self managedObjectContext];
NSFetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription* entity = [NSEntityDescription entityForName:@"Remind" inManagedObjectContext:context];
[request setEntity:entity];
NSError* error = nil;
NSArray* array = [context executeFetchRequest:request error:&error];
if( !array ) {
NSLog(@"Error Fetching: %@", error);
}
[self setDesitnationsArray:[array mutableCopy]];
[destinationsTableView reloadData];
}
, ivars , , , , _managedObjectContext _privateContext, -, , . Objective-C , , , self, , self.managedObjectContext. , , , , , , ( ).