Created
March 13, 2013 10:15
-
-
Save mactive/5150822 to your computer and use it in GitHub Desktop.
想利用一个Coredata 的Model 但又不想写入数据库
This file contains hidden or 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
//http://stackoverflow.com/questions/3868514/is-there-a-way-to-instantiate-a-nsmanagedobject-without-inserting-it | |
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Transaction" inManagedObjectContext:self.managedObjectContext]; | |
transaction = (Transaction *)[[NSManagedObject alloc] initWithEntity:entity insertIntoManagedObjectContext:nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment