Created
November 30, 2011 07:40
-
-
Save yasirmturk/1408352 to your computer and use it in GitHub Desktop.
A generic core data function to save and commit our changes to DB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* We can fetch a record, modify it and then call this save function to save our changes | |
*/ | |
- (BOOL)saveToDb{ | |
NSError *error = nil; | |
BOOL returnVal = ( [[self managedObjectContext] save:&error] ); | |
if(error != nil) | |
NSLog(@"%@", error); | |
return returnVal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment