Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: cb7ff04685
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (17 sloc) 0.548 kb
#import "NSArray-NestedArrays.h"
@implementation NSArray(NestedArrays)
- (id)nestedObjectAtIndexPath:(NSIndexPath *)indexPath {
NSUInteger row = [indexPath row];
NSUInteger section = [indexPath section];
NSArray *subArray = [self objectAtIndex:section];
if (![subArray isKindOfClass:[NSArray class]])
return nil;
if (row >= [subArray count])
return nil;
return [subArray objectAtIndex:row];
- (NSInteger)countOfNestedArray:(NSUInteger)section {
NSArray *subArray = [self objectAtIndex:section];
return [subArray count];
Jump to Line
Something went wrong with that request. Please try again.