Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone DebugLog格式字符串不是字符串文字_Iphone_Ios_Xcode_Debugging_Ios5 - Fatal编程技术网

Iphone DebugLog格式字符串不是字符串文字

Iphone DebugLog格式字符串不是字符串文字,iphone,ios,xcode,debugging,ios5,Iphone,Ios,Xcode,Debugging,Ios5,我的代码看起来像 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(@“%@”,urlStr)试试这个:Debu

我的代码看起来像

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(@“%@”,urlStr)

试试这个:
DebugLog(@“%@”,urlStr)

什么是调试日志?是您创建的方法吗?什么是DebugLog?是您创建的方法吗?