Hi all,
I asked a similar question a while back, but I'm clearly missing something.
I have 2 view controllers - one that displays the data and one where data is edited. In my first controller, I create my object:
thing = [NSEntityDescription insertNewObjectForEntityForName:@"Thing" inManagedObjectContext:managedObjectContext];
thing.DateTime = [NSDate date];
thing.aNumber = [NSNumber numberWithInt:12000];
In the didSelectRowAtIndexPath method, I then create a new controller and add some of this data:
ThingDetailController *thingDetailController = [[ThingDetailController alloc] initwithDateTime:thing.DateTime];
thingDetailController.managedObjectContext = self.managedObjectContext;
[[self navigationController] pushViewController:thingDetailController animated:YES];
[thingDetailController release];
In my initWithDateTime initializer, I assign the DateTime that is passed in to my ThingDetailController.dateTime object:
- (id)initWithDateTime:(NSDate *)dateStamp {
dateTime = dateStamp;
return self;
}
When my new controller appears on the screen, that data is present and usable, but any changes I make there are not sent back to the parent controller when I tap the back button in the detail editor controller.
What do I need to do to make this value changeable in that area ?
Thanks in advance,