Created
December 21, 2013 17:07
-
-
Save matejkramny/8072120 to your computer and use it in GitHub Desktop.
Used within networking of iOrder app
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
- (NSMutableArray *)loopAndLoad:(NSArray *)args object:(Class)target { | |
NSMutableArray *arr = [[NSMutableArray alloc] init]; | |
if ([args count] == 0) { | |
return arr; | |
} | |
for (NSDictionary *x in [args objectAtIndex:0]) { | |
id<NetworkLoadingProtocol> obj = [[target alloc] init]; | |
[obj loadFromJSON:x]; | |
[arr addObject:obj]; | |
} | |
return arr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment