acid
acid

Reputation: 13

Core Data does not update

This is the sequence of steps I have taken:

I had this problem also with sqlite, and I didn't fix it. No, I am also stacked with CoreData.

-(IBAction)save:(id)sender
{
    [passwords setValue:nametxt.text forKey:@"name"];

    [passwords setValue:usernametxt.text forKey:@"username"];


}

-(void) viewWillAppear:(BOOL)animated
{
    self.title = passwords.name;

    nametxt.text = passwords.name;
    usernametxt.text = passwords.username;

}

Upvotes: 0

Views: 172

Answers (1)

Adam
Adam

Reputation: 26937

You need to call save method of your NSManagedObjectContext.

NSError *error = nil;
[managedObjectContext save:&error];
if (error) {
//inform user
}

Upvotes: 2

Related Questions