2012-03-08 47 views
0

我的代碼看起來像DEBUGLOG格式字符串不是一個字符串

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 
+1

什麼是DEBUGLOG?你創建了一個方法嗎? – 2012-03-08 16:37:16

回答

3

試試這個:DebugLog(@"%@", urlStr);

+0

%@是什麼意思? – 2014-07-18 09:08:06