AXKit icon indicating copy to clipboard operation
AXKit copied to clipboard

0.0.14 更新日志

Open xaoxuu opened this issue 7 years ago • 0 comments

#if DEBUG的简单封装

函数很简单,能够提供一点便利,毕竟函数的调用比写宏更加快捷而且不易出错。

声明:

/**
 只在debug模式下运行的函数
 
 @param debug debug操作
 */
FOUNDATION_EXTERN void ax_debug_only(void (^debug)());

实现:

inline void ax_debug_only(void (^debug)()){
#ifdef DEBUG
    if (debug) {
        debug();
    }
#endif
}

xaoxuu avatar Aug 16 '17 07:08 xaoxuu