據(jù)說(shuō)國(guó)外的大神是這么解決的:
#ifdef DEBUG
#define SLog(format, ...) printf("class: <%p %s:(%d) > method: %s \n%s\n", self, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, __PRETTY_FUNCTION__, [[NSString stringWithFormat:(format), ##__VA_ARGS__] UTF8String] )
#else
#define SLog(format, ...)
#endif
在此基礎(chǔ)上進(jìn)行了修改:
#ifdef DEBUG //開(kāi)發(fā)階段
#define NSLog(format,...) printf("%s",[[NSString stringWithFormat:(format), ##__VA_ARGS__] UTF8String])
#else //發(fā)布階段
#define NSLog(...)
問(wèn)題解決了再芋,OK~