1.NSlog发布后不打印#ifdef DEBUG//如果有DEBUG这个宏就编译下面一句代码#define DDLog(...) NSLog(__VA_ARGS__)#else//如果没有DEBUG这个宏就编译下面一句代码#define DDLog(...)#endif2.三方库及其他整理用过的三...
分类:
移动开发 时间:
2015-07-16 18:26:20
阅读次数:
184
1.在调试时,打印NSLog 在打包上线后运行不打印NSLog的pch设置: //配置nslog#ifdef DEBUG#define NSLog(...) NSLog(__VA_ARGS__)#else#define NSLog(...)#endif2.配置
分类:
其他好文 时间:
2015-07-12 20:15:07
阅读次数:
89
1、.pch文件1->#ifdef DEBUG//调试阶段#define MJLog(...) NSLog(__VA_ARGS__)#else//发布阶段#define MJLog(...)#endif2->里面的所有内容只能用到.m文件中或者.mm3->pch文件的作用:1.存放一些全局的宏(整个...
分类:
移动开发 时间:
2015-07-08 12:23:56
阅读次数:
106
OC 中调试打印/*** 自定义Log*/#ifdef DEBUG#define JYLog(...) NSLog(__VA_ARGS__)#else#define JYLog(...)#endif// swift中我写了这么一个类,进行调试输出 调用方法 Debug.Log(error)im...
分类:
编程语言 时间:
2015-07-05 12:20:52
阅读次数:
198
在Debug模式下中断, 在Release模式下返回的断言
#define UXY_ASSERT_RETURN_ON_RELEASE( __condition, __desc, ... ) metamacro_if_eq(0, metamacro_argcount(__VA_ARGS__)) (UXY_ASSERT_1(__condition, __desc,...
分类:
其他好文 时间:
2015-07-02 17:34:29
阅读次数:
105
在.pch文件中添加下面一段#ifndef __OPTIMIZE__#define NSLog(...) NSLog(__VA_ARGS__)#else#define NSLog(...) {}#endif如何添加 pch 文件,xcode - new file -pch file。 将Preco....
分类:
移动开发 时间:
2015-06-27 11:28:54
阅读次数:
156
步骤比较简单,只需要 在.pch中追加你对应的宏定义#ifdef DEBUG#define LOG(...) NSLog(__VA_ARGS__);#define LOG_METHOD NSLog(@"%s", __func__);#else#define LOG(...); #define LOG...
分类:
移动开发 时间:
2015-05-23 22:31:37
阅读次数:
284
http://blog.csdn.net/yrj/article/details/4924041、GCC的编译和安装2、预处理 #define 可以支持不定数量的参数。 例子如下: #define err(...) fprintf(stderr,__VA_ARGS__) err("%s,%d/r/n...
分类:
其他好文 时间:
2015-05-22 00:01:36
阅读次数:
322
在 GNU C 中,宏可以接受可变数目的参数,就象函数一样,例如:#define pr_debug(fmt,arg...) \printk(KERN_DEBUG fmt,##arg)用可变参数宏(variadic macros)传递可变参数表你可能很熟悉在函数中使用可变参数表,如:void prin...
分类:
其他好文 时间:
2015-05-10 16:53:46
阅读次数:
141
pch中:#ifndef __OPTIMIZE__#define NSLog(...) NSLog(__VA_ARGS__)#else#define NSLog(...) {}#endif__OPTIMIZE__ 这个宏是用来标识是否是release的。选择edit scheme菜单项编辑 ,选择i...
分类:
其他好文 时间:
2015-05-05 12:19:14
阅读次数:
139