如何实现nslog在生成静态库以后就不打印输出了

使用宏 重定义 方法实现、、release模式下空方法便可
Debug模式 考虑一下游戏和应用里面的宏名,写全了

//#if !(TARGET_IPHONE_SIMULATOR)
//#define NSLog(format,...) do {} while (0)
//#endifspa



#ifdef __OBJC__orm

    #import <UIKit/UIKit.h>游戏

    #import <Foundation/Foundation.h>string

#endifit


#ifdef DEBUG1io

//#define NSLog( s, ... ) NSLog( @"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )ast

#elseform

//#define NSLog( s, ... )import

#endifbug

相关文章
相关标签/搜索