Created
January 10, 2013 10:32
-
-
Save tonymillion/4501089 to your computer and use it in GitHub Desktop.
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
+ (NSArray *) MR_importFromArray:(NSArray *)listOfObjectData inContext:(NSManagedObjectContext *)context | |
{ | |
NSMutableArray *objects = [NSMutableArray array]; | |
[listOfObjectData enumerateObjectsWithOptions:0 | |
usingBlock:^(id obj, NSUInteger idx, BOOL *stop) | |
{ | |
NSDictionary * dict = obj; | |
if([dict isKindOfClass:[NSDictionary class]]) | |
{ | |
NSManagedObject *importedObject = [self MR_importFromObject:dict | |
inContext:context]; | |
[objects addObject:importedObject]; | |
} | |
}]; | |
return objects; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment