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?是您创建的方法吗?