Created
February 11, 2014 12:58
-
-
Save r-plus/8934385 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
@implementation NSArray(ValueAtIndex) | |
- (NSArray *)valueAtIndex:(NSUInteger)index | |
{ | |
NSMutableArray *array = [NSMutableArray array]; | |
for (NSArray *a in self) | |
if (a.count >= index + 1) | |
[array addObject:a[index]]; | |
return [NSArray arrayWithArray:array]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment