//打印宏 #if DEBUG public let CHDebugLog = { (items: Any...) in print(items) } #else public let CHDebugLog = { (items: Any...) in } #endif
在xcode中设置debug模式下开启打印宏,如下图
原文链接:https://www.f2er.com/swift/321179.html
//打印宏 #if DEBUG public let CHDebugLog = { (items: Any...) in print(items) } #else public let CHDebugLog = { (items: Any...) in } #endif
原文链接:https://www.f2er.com/swift/321179.html