我应该在哪里放置此类调试宏,我想将其用作gloabl。
#define DEBUG_MODE
#ifdef DEBUG_MODE
#define DebugLog( s, ... ) NSLog( @"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define DebugLog( s, ... )
#endif
由于prefix.pch已在Xcode 6中删除。
Constant.h
仅创建一个文件。
import
view controllers
,macros
等了需要进口whole application
。
这样使用viewcontroller
:
#import "Constant.h"
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句