1、为了全文通用,选择在PCH文件中写:
//
// 版权所有:Copyright © 2018年 Lelight. All rights reserved.
// 创 建 者: Lelight
// 创建日期:2018/5/18
// 文档说明:
// 修 改 人:
// 修改日期:
#ifndef SimpleBle_pch
#define SimpleBle_pch
// DEBUG 模式下打印日志,当前行
#ifdef DEBUG
#define CHLog(fmt, ...) NSLog((@"%s [Line %d] "fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define CHLog(...)
#endif
#endif /* SimpleBle_pch */
- 使用方法与系统原有的一致。