【问题标题】:Expression Result Unused (with array description)表达式结果未使用(带有数组描述)
【发布时间】:2014-10-29 04:51:18
【问题描述】:

基本上,我正在尝试打印出NSArray's 描述。

我收到了'Expression Result Unused',尽管我已经尝试了所有可以在网上找到的方法!

有人知道吗?

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

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

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

【问题讨论】:

    标签: objective-c arrays nsarray


    【解决方案1】:

    你需要使用:

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

    感谢Append string with variable

    【讨论】:

      猜你喜欢
      • 2012-10-20
      • 1970-01-01
      • 2021-02-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-03
      • 2020-12-18
      • 1970-01-01
      相关资源
      最近更新 更多