在C/C++/Objective-C中,您可以使用编译器预处理器定义宏.此外,您可以使用编译器预处理器包含/排除代码的某些部分.
#ifdef DEBUG // Debug-only code #endif
Swift中有类似的解决方案吗?
xcode preprocessor preprocessor-directive swift
preprocessor ×1
preprocessor-directive ×1
swift ×1
xcode ×1