此 CocoaPod 提供了一种可使用行和列索引使用二维数组的能力。
SHTwoDimensionalArray 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod 'SHTwoDimensionalArray'
#import "SHTwoDimensionalArray.h"
SHTwoDimensionalArray *twoDArray = [SHTwoDimensionalArray arrayWithRows:2 andColumns:2];
[twoDArray setObject:@"Foo" inRow:0 column:0];
...
NSString *foo = [twoDArray objectInRow:0 column:0];
Ahmad Shabibul Hossain
SHTwoDimensionalArray 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。