UITableView 中 SimpleDB 项、属性和值的可变数组
下面是返回的 AWS SimpleDB Item 数组 (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"];
Below is this returned NSLog of an array (items3) of AWS SimpleDB Item with two attributes and two attribute values. I want to show a UITableView of the cell.textLabel.text = ItemName and cell.detailTextLabel.text = Value2.
items3 = (
"ItemName",
(
"{Name: Attribute1,AlternateNameEncoding: (null),Value: Value1,AlternateValueEncoding: (null),<SimpleDBAttribute: 0x2eeaf0>}",
"{Name: Attribute2,AlternateNameEncoding: (null),Value: Value2,AlternateValueEncoding: (null),<SimpleDBAttribute: 0x2f38e0>}",
)
How do show all items, but only the value for Attribute2? Is there a way to say object for Key@"Attribute2" which equals value2?
Something like:
cell.textLabel.text = [itmes3 objectAtIndex: indexpath.row];
[[ cell.detailTextLabel.text = [[items3 objectAtIndex:0] stringForKey:@"Attribute2"];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用:
然后对 item.name 运行 GetAttributesRequest,如下所示:
Use:
then run a GetAttributesRequest on item.name, like this: