悟空记账

NSArray+JZExtension.m 452B

123456789101112131415161718192021222324252627
  1. //
  2. // NSArray+JZExtension.m
  3. // JIZHANG
  4. //
  5. // Created by jikaipeng on 2017/11/21.
  6. // Copyright © 2017年 kuxuan. All rights reserved.
  7. //
  8. #import "NSArray+JZExtension.h"
  9. @implementation NSArray (JZExtension)
  10. - (id)objectAtIndexCheck:(NSUInteger)index
  11. {
  12. if (index >= [self count]) {
  13. return nil;
  14. }
  15. id value = [self objectAtIndex:index];
  16. if (value == [NSNull null]) {
  17. return nil;
  18. }
  19. return value;
  20. }
  21. @end