【问题标题】:DebugLog Format string is not a string literalDebugLog 格式字符串不是字符串文字
【发布时间】:2012-03-26 03:23:57
【问题描述】:

我的代码看起来像

DebugLog(urlStr);

urlStr 是一个 NSString 但我不断收到警告说

Format string is not a string literal

我从一个网站获得了这个代码。

#ifdef DEBUG
#define DebugLog(s, ...) NSLog(s, ##__VA_ARGS__)
#else
#define DebugLog(s, ...)
#endif

【问题讨论】:

  • 什么是DebugLog?是你创建的方法吗?

标签: iphone ios xcode debugging ios5


【解决方案1】:

试试这个:DebugLog(@"%@", urlStr);

【讨论】:

    猜你喜欢
    • 2018-09-15
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多