【发布时间】:2011-10-03 20:18:18
【问题描述】:
下面是 AWS SimpleDB 项的数组 (items3) 的返回 NSLog,它具有两个属性和两个属性值。我想显示 cell.textLabel.text = ItemName 和 cell.detailTextLabel.text = Value2 的 UITableView。
items3 = (
"ItemName",
(
"{Name: Attribute1,AlternateNameEncoding: (null),Value: Value1,AlternateValueEncoding: (null),<SimpleDBAttribute: 0x2eeaf0>}",
"{Name: Attribute2,AlternateNameEncoding: (null),Value: Value2,AlternateValueEncoding: (null),<SimpleDBAttribute: 0x2f38e0>}",
)
如何显示所有项目,但只显示 Attribute2 的值?有没有办法说 Key@"Attribute2" 的对象等于 value2?
类似:
cell.textLabel.text = [itmes3 objectAtIndex: indexpath.row];
[[ cell.detailTextLabel.text = [[items3 objectAtIndex:0] stringForKey:@"Attribute2"];
【问题讨论】:
-
我可以通过某种方式改进这个问题吗?我需要帮助。
标签: iphone uitableview nsmutablearray