Compiling Source Code Conditionally for iOS App 模拟器条件编译,判断是IOS还是MAC
来源:互联网 发布:java编译器eclipse 编辑:程序博客网 时间:2024/04/29 20:31
Listing 2-1 Determining whether you’re compiling for a simulator
// Set hello to "Hello, <device or simulator>"!
#if TARGET_IPHONE_SIMULATOR
NSString *hello = @"Hello, iOS Simulator!";
#else
NSString *hello = @"Hello, iOS device!";
#endif
Listing 2-2 shows how to use the TARGET_OS_IPHONE macro in a source file to be shared between Mac OS X and iOS.
Listing 2-2 Determining whether you’re compiling for a device
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif
The TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR macros are defined in the TargetConditionals.h header file.
- Compiling Source Code Conditionally for iOS App 模拟器条件编译,判断是IOS还是MAC
- Compiling the Android source code for ARMv4T
- 151130ios判断是直机还是模拟器
- ffmpeg for mac 编译iOS
- iOS判断是ipad还是iphone
- ios判断设备是iphone还是ipad
- PHP 判断客户端是IOS还是Android
- 浏览器判断设备是android还是ios
- iOS 判断字符是全角还是半角
- 判断是ios还是安卓访问
- iOS判断是ipad还是iphone
- 判断设备是ios还是安卓
- PHP判断手机是IOS还是Android
- ios 判断是iphone还是ipad
- PHP判断手机是IOS还是Android
- JS判断是IOS还是Android
- mui判断是ios还是安卓
- iOS open source code
- 【MFC】遍历文件夹及其子文件夹
- SQL Server + ArcSDE 部署记录
- HTTP头信息的各项参数一览
- rt-thread谷歌code
- Ubuntu 11.10中的常用快捷键列表
- Compiling Source Code Conditionally for iOS App 模拟器条件编译,判断是IOS还是MAC
- Spring对事务管理的支持的发展历程(基础篇)
- VS2010 build : error MSB6006: cmd.exe exited with code 1.
- 利用C语言实现计算机图像处理的方法
- 有关 Thread.Sleep(2000),写的很好
- 完成英语第一阶段的学习,明天开始第二阶段
- 黑马程序员--第一阶段3.面向对象--第6天
- 设置弹出式菜单
- 忘记mysql root密码的解决方法