[英]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.