swift 中使用像oc中一样的宏条件 90后晨仔 2021-04-13 96 阅读1分钟 在xcode中设置如下: 代码中使用如下 func test(sender: AnyObject!) { #if TEST_VERSION // 测试版本 #else // 实际的版本 #endif }