我希望在Objective-C类中有一个编译器(预编译器)指令来区分模拟器构建和设备构建.
#if SIMULATOR call testModule(); #else call productionModule(); #endif
iPad/iPhone的X代码中是否有#directive?
Vla*_*mir 10
#if TARGET_IPHONE_SIMULATOR
// simulator code
#else
//device code
#endif
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
549 次 |
| 最近记录: |