简体   繁体   English

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

[英]Expression Result Unused (with array description)

Basically, I'm trying to print out an NSArray's description. 基本上,我试图打印出NSArray's描述。

I'm getting 'Expression Result Unused' , even though I've tried everything I could find online! 即使我已经尝试了所有可以在网上找到的内容,但我却获得了'Expression Result Unused'

Does anyone know? 有人知道吗?

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

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

How could I append WalletBalance's description into a string? 如何将WalletBalance's描述附加到字符串中?

You need to use: 您需要使用:

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

Courtesy of Append string with variable 带有变量Append字符串提供

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM