123456789101112131415161718192021222324252627 |
- //
- // NSArray+RQExtension.m
- // XinShouJiaDao
- //
- // Created by 张嵘 on 2021/7/7.
- // Copyright © 2021 JCZ. All rights reserved.
- //
- #import "NSArray+RQExtension.h"
- @implementation NSArray (RQExtension)
- -(id)objAtPath:(NSIndexPath*)path
- {
- if (path.section < self.count ) {
- NSArray* subObj = self[path.section];
- if([subObj isKindOfClass:[NSArray class]] ||
- [subObj isKindOfClass:[NSMutableArray class]])
- {
- if (path.row < subObj.count) {
- return [self[path.section] objectAtIndex:path.row];
- }
- }
- }
-
- return nil;
- }
- @end
|