iOS - Availability.h
>for 'dispatch' application inner to begin note
`#include <Availability.h>`
These macros are for use in OS header files. They enable funcation prototypes and Objective-C methods to be tagged with the OS version in which they were first available; and, if applicable, the OS version in which they beacom deprecated.
Examples (_NA: not applicable):
__OSX_AVAILABLE_STARING(__MAC_10_2,__IPHONE_2_0)
__OSX_AVALIABLE_STARING(__MAC_10_2,__IPHONE_NA)
__OSX_AVALIABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_5,__IPHONE_5_0,__IPHONE_8_0)
__OSX_AVALIABLE_BUT_DEPERCATED(__MAC_10_2,__MAC_10_5,__IPHONE_NA,__IPHONE_NA)
For these macros to funcation properly, a program must specify the OS version range it is targeting. the min OS version is specified as an option to the compiler: -mmacosx-version-min=10.x when building for Mac OS X, and -miphoneos-version-min=y.z when building for the iPhone.
Examples:
__OSX_AVAILABLE_STARING(__MAC_10_5,__IPHONE_NA);
#if __IPHONE_OS_VERSION_MIN_REQUIRED // this macros avliable in iPhoneOS Only
enum{
myX = 1, // Usable on iPhoneOS 2.1 and later
myY = 2, // Usable on iPhoneOS 2.0 and later
myZ = 3, // Usable on iPhoneOS 3.0 and later
...
}
#endif
These macros
```
/*! MACOS-X version*/
#define __MAC_10_0 1000
#define __MAC_10_1 1010
...
#define __MAC_10_11_4 101104
/*! iPhoneOS version*/
#define __IPHONE_2_0 20000
#define __IPHONE_2_1 20100
...
#define __IPHONE_9_3 90300
/*! TVOS version*/
#define __TVOS_9_0 90000
#define __TVOS_9_1 90100
#define __TVOS_9_2 90200
/*! WATCHOS version*/
#define __WATCHOS_1_0 10000
#define __WATCHOS_2_0 20000
```
iOS - Availability.h的更多相关文章
- iOS math.h数学函数
在实际工作中有些程序不可避免的需要使用数学函数进行计算,比如地图程序的地理坐标到地图坐标的变换.Objective-C做为ANSI C的扩展,使用C标准库头文件<math.h>中定义的数学 ...
- ios math.h 常用数学函数
1. 三角函数 double sin (double);正弦 double cos (double);余弦 double tan (double);正切 2 .反三角函数 double as ...
- H.264格式,iOS硬编解码 以及 iOS 11对HEVC硬编解码的支持
H.264格式,iOS硬编解码 以及 iOS 11对HEVC硬编解码的支持 1,H.264格式 网络表示层NAL,如图H.264流由一帧一帧的NALU组成: SPS:序列参数集,作用于一系列连续的编码 ...
- ios 宏定义 系统版本 判定
当需要判断iOS系统版本的时候,相信很多人都会这么干: #define SystemVersion [[UIDevice currentDevice] systemVersion].floatValu ...
- 在MacOS和iOS系统中使用OpenCV
在MacOS和iOS系统中使用OpenCV 前言 OpenCV 是一个开源的跨平台计算机视觉库,实现了图像处理和计算机视觉方面的很多通用算法. 最近试着在 MacOS 和 iOS 上使用 OpenCV ...
- iOS:集成支付宝支付
一.介绍 支付宝的集成还是比较简单的,按照文档来一步步操作,基本上很顺利.不过,仍然有两个地方会是坑.这里我集成成功了,在此整理一下.说先说一下我遇到的坑如下: 第一个坑:下载的SDK文件AliPay ...
- IOS开发之不同版本适配问题2(#ifdef __IPHONE_7_0)
继续说说ios不同版本之间的适配 先说一个东西:在xcode当中有一个东西叫targets,苹果的官方文档是这样说的: A target specifies a product to build an ...
- ios开发 <AppName>-Prefix.pch文件的用法详解
我们知道,每新建立一个工程,比如说HelloWord,在分类SupportingFiles里都会有一个以工程名开头-Prefix.pch结尾的文件,如HelloWord-Prefix.pch.对于这个 ...
- IOS开发之不同版本适配问题2(#ifdef __IPHONE_7_0)(转载)
继续说说ios不同版本之间的适配 先说一个东西:在xcode当中有一个东西叫targets,苹果的官方文档是这样说的: A target specifies a product to build an ...
随机推荐
- Python __init__.py 作用详解
__init__.py 文件的作用是将文件夹变为一个Python模块,Python 中的每个模块的包中,都有__init__.py 文件. 通常__init__.py 文件为空,但是我们还可以为它增加 ...
- ASP.NET Web API 安全验证之摘要(Digest)认证
在基本认证的方式中,主要的安全问题来自于用户信息的明文传输,而在摘要认证中,主要通过一些手段避免了此问题,大大增加了安全性. 1.客户端匿名的方式请求 (无认证) HTTP/ Unauthorized ...
- [CF#250 Div.2 D]The Child and Zoo(并查集)
题目:http://codeforces.com/problemset/problem/437/D 题意:有n个点,m条边的无向图,保证所有点都能互通,n,m<=10^5 每个点都有权值,每条边 ...
- Java Little Knowledge
1.Constructor running order of Base class and Derived class This is Alibaba's audition problem. clas ...
- Simple File System
This is my operating system class design. scanner.h #include<string> using namespace std; #pra ...
- linux基础-第十一单元 系统监控
第十一单元 系统监控 系统监视和进程控制工具-top和free top命令的功能 TOP是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序 ...
- oracle递归查询树的SQL语句
来自互联网 SELECT * FROM a_ParkingLot AWHERE A.REGIONID IN( SELECT r.ID FROM a_region r START WITH ...
- iOS开发--QQ音乐练习,后台播放和锁屏界面
一.设置后台播放 首先允许程序后台播放 代码实现 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOpti ...
- HSV
HSV 相比于面向机器的RGB, HSV或HSI更贴近于人对颜色的描述: H: Hue, 颜色本身 S: Saturation, 纯色被白色稀释的程度. V: Value, 或I, Intensity ...
- 基于tomcat-jQ-springMVC-bootstrap的公司产品管理WEB应用
管理员登录后台以后才能操作 ,权限管理只有一个管理员, 系统的主要作用是查看所有的 “公司列表”, 并查看该公司的”产品“, 用户可以对该公司的产品进行添加或者删除, 添加或者删除公司等 , 添加产品 ...