0

我正在尝试在 detailTextLabel 中输入静态文本,它提供了在某些上下文中提取的信息。

目前我有[[cell detailTextLabel] setText: [[artist valueForKey:@"listeners"] description]]; 哪个非常适合吸引听众的数量,但是我希望单元格显示类似“听众:(听众人数)”的内容。

我不能在这里工作的是在从 JSON 中提取的数字之前有“Listeners:”。

4

1 回答 1

0
NSString *listeners = [NSString stringWithFormat:@"Listeners: %i", [[artist valueForKey:@"listeners"] description]];
cell.detailTextLabel.text = listeners;
于 2015-03-05T04:44:59.323 回答