Latest 1.0.0
Homepage https://github.com/lincf0912/IndexArray
License MIT
Platforms ios 7.0, requires ARC
Authors
  • 包含字典与数组的结合对象,基本跟NSArray的用法一样;
  • 可以直接将NSArray替换为IndexArray使用。

Installation 安装

  • CocoaPods:pod ‘IndexArray’
  • 手动导入:将IndexArrayDEMOclass文件夹拽入项目中,导入头文件:#import "IndexArray.h"

调用代码

初始化序列

    • (void)setIndexKey:(NSArray <NSDictionary <NSString , NSString >>)objects;
  • IndexArray *indexArray = [IndexArray new];
  • [indexArray addObject:obj];

  • NSLog(@"Get objects at index : %@", [indexArray objectAtIndex:5]);
  • NSLog(@"Get objects at index : %@", [indexArray objectAtIndex:15]);

  • NSLog(@"Get objects at key : %@", [indexArray objectForKey:@"ew1uiw"]);
  • NSLog(@"Get objects at key : %@", [indexArray objectForKey:@"fwne22"]);

Latest podspec

{
    "name": "IndexArray",
    "version": "1.0.0",
    "summary": "The combination of dictionary and array.",
    "homepage": "https://github.com/lincf0912/IndexArray",
    "license": "MIT",
    "authors": {
        "lincf0912": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/lincf0912/IndexArray.git",
        "tag": "1.0.0",
        "submodules": true
    },
    "requires_arc": true,
    "source_files": "IndexArrayDemo/class/*.{h,m}",
    "public_header_files": "IndexArrayDemo/class/*.h"
}

Pin It on Pinterest

Share This