Skip to content

Instantly share code, notes, and snippets.

@steveriggins
Created June 11, 2011 00:41
Show Gist options
  • Save steveriggins/1020109 to your computer and use it in GitHub Desktop.
Save steveriggins/1020109 to your computer and use it in GitHub Desktop.
// Given a set of NSManagedObjects, return those objects in this managed object context
-(NSMutableSet*)objectsInSet:(NSSet*)objects {
NSMutableSet *newSet = [NSMutableSet set];
for (NSManagedObject* object in objects) {
[newSet addObject:[self objectWithID:object.objectID]];
}
return newSet;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment