Update to swift 3.0 final (#647)

This commit is contained in:
刘彦博
2016-09-14 09:56:06 +08:00
committed by 安正超
parent abe1c5d76e
commit 4f4cc171e7

View File

@ -770,3 +770,11 @@ if #available(iOS 10, macOS 10.12, *) {
在它一般的形式中,可用性条件使用了一个平台名字和版本的列表。平台名字可以是`iOS``macOS``watchOS`和`tvOS`——请访问[声明属性](../chapter3/06_Attributes.html)来获取完整列表。除了指定像 iOS 8的主板本号我们可以指定像iOS 8.3 以及 macOS 10.10.3的子版本号。
```swift
if #available(platform name version, ..., *) {
statements to execute if the APIs are available
} else {
fallback statements to execute if the APIs are unavailable
}
```