类似 objective c 的以下语法:
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_6_0
// iOS 6+ code here
#else
// Pre iOS 6 code here
#endif
我搜了一圈没找到什么在 swift 的 preprocess/debug flag 里判断 iOS 版本的,只找到了 runtime check ,但是 runtime 的时候不能 import 。不知道有没有任何办法解决...