您好,我有三个 NSMutableArray
。例如数组 - a ,b c。假设所有 3 个数组的大小均为 3。
想问一下如何创建 3 个部分,每个部分包含 3 行(根据数组编号)。在每个部分中,a的第1行,b的第2行,c的第3行
1st Section:
[a objectAtIndex:1]
[b objectAtIndex:1]
[c objectAtIndex:1]
2nd Section:
[a objectAtIndex:2]
[b objectAtIndex:2]
[c objectAtIndex:2]
3rd Section:
[a objectAtIndex:3]
[b objectAtIndex:3]
[c objectAtIndex:3]
谢谢!!
最佳答案
创建另一个数组并将 a,b,c 数组压入其中
NSArray container =@[a,b,c];
在你的tableview cellforRow
使用 container[indexPath.row][indexPath.section]
关于ios - 一个部分中的表格单元格不同数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20990050/