use*_*686 0 iphone sdk uitableview ios5
嗨,我有这行代码.
cell.detailTextLabel.text = [[self->jsonArray objectAtIndex:indexPath.row] objectForKey:@"city"];
Run Code Online (Sandbox Code Playgroud)
我想使用两个objectForKeys.我有一个"城市"和"州"的钥匙,我希望他们在那个详细的文本标签中放在一起.我该怎么办?
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@, %@",
[[self->jsonArray objectAtIndex:indexPath.row] objectForKey:@"city"],
[[self->jsonArray objectAtIndex:indexPath.row] objectForKey:@"state"]];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
648 次 |
| 最近记录: |