表达式结果未使用(带数组描述)

时间:2014-10-29 04:51:19

标签: objective-c arrays nsarray

基本上,我尝试打印NSArray's说明。

我得到了'Expression Result Unused',即使我已经尝试过在网上找到的所有内容!

有人知道吗?

 NSArray *WalletBalance= [responseDict objectForKey:@"balance"];

 NSString *wBalance = (@"This wallet currently has %@ dollars", [WalletBalance description]);

如何将WalletBalance's描述附加到字符串中?

1 个答案:

答案 0 :(得分:0)

您需要使用:

NSString *someText = [NSString stringWithFormat:@"This wallet currently has %@ dollars", [WalletBalance description]];

Append string with variable提供