【发布时间】:2016-08-18 10:01:23
【问题描述】:
我想使用多个部分功能UITableView。我有一个NSMutableArray,其中包含字典格式的数据。在该字典中有一个键,其值为“0”和“1”。
我想从中创建两个单独的NSMutableArray,以便我可以在不同的部分中相应地分配它们。
例如:
if (indexPath.section==0) {
NSDictionary *Data = [roomList1 objectAtIndex:indexPath.row];
} else {
NSDictionary *Data = [roomList2 objectAtIndex:indexPath.row];
}
【问题讨论】:
-
字典中值 0/1 的键是什么。您可以使用谓词来获取具有 0 和 1 的不同值数组
-
你能在这里给我看一些json数据吗?
-
LIST:( { d = "1"; g = "Local"; id = 9550; n = testapp1; s = available; }, { d = "0" g = "Local"; id = 5319;n = chatplus1;s = away;}, })
-
需要根据那个'd'键拆分它
标签: ios objective-c iphone uitableview nsmutablearray