Swift - 编译时的 Swift 版本检查
2016-09-27 本文已影响26人
Hesse_Huang
#if swift(>=3.0)
print("We are using Swift 3.0!")
#else
print("Not using Swift 3.0!")
#endif
#if swift(>=3.0)
print("We are using Swift 3.0!")
#else
print("Not using Swift 3.0!")
#endif