make gitbook
This commit is contained in:
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/chapter2.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="基础部分 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="基础部分 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6473">
|
||||
<section class="normal" id="section-gitbook_100">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:numbbbbb, lyuka, JaySurplus</p>
|
||||
@ -923,6 +923,7 @@ let convertedNumber = possibleNumber.toInt()
|
||||
<p>注意:</p>
|
||||
<p>使用<code>!</code>来获取一个不存在的可选值会导致运行时错误。使用<code>!</code>来强制解析值之前,一定要确定可选包含一个非<code>nil</code>的值。</p>
|
||||
</blockquote>
|
||||
<p><a name="optional_binding"></a></p>
|
||||
<h3 id="-">可选绑定</h3>
|
||||
<p>使用<em>可选绑定(optional binding)</em>来判断可选是否包含值,如果包含就把值赋给一个临时常量或者变量。可选绑定可以用在<code>if</code>和<code>while</code>语句中来对可选的值进行判断并把值赋给一个常量或者变量。<code>if</code>和<code>while</code>语句,请参考<a href="05_Control_Flow.html">控制流</a>。</p>
|
||||
<p>像下面这样在<code>if</code>语句中写一个可选绑定:</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/01_The_Basics.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="基本运算符 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="基本运算符 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6494">
|
||||
<section class="normal" id="section-gitbook_121">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:xielingwang</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/02_Basic_Operators.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="字符串和字符 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="字符串和字符 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.3" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.3" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6475">
|
||||
<section class="normal" id="section-gitbook_102">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:wh1100717</p>
|
||||
@ -609,7 +609,7 @@
|
||||
<li><a href="#uppercase_and_lowercase_strings">字符串大小写</a></li>
|
||||
<li><a href="#unicode">Unicode</a></li>
|
||||
</ul>
|
||||
<p><code>String</code>是例如“hello, world“”,“海贼王” 这样的有序的<code>Character</code>(字符)类型的值的集合,通过<code>String</code>类型来表示。</p>
|
||||
<p><code>String</code>是例如“hello, world”,“海贼王” 这样的有序的<code>Character</code>(字符)类型的值的集合,通过<code>String</code>类型来表示。</p>
|
||||
<p>Swift 的<code>String</code>和<code>Character</code>类型提供了一个快速的,兼容 Unicode 的方式来处理代码中的文本信息。
|
||||
创建和操作字符串的语法与 C 语言中字符串操作相似,轻量并且易读。
|
||||
字符串连接操作只需要简单地通过<code>+</code>号将两个字符串相连即可。
|
||||
@ -751,7 +751,7 @@ let message = "\(multiplier) 乘以 2.5 是 \(Double(multiplier) * 2.5)&quo
|
||||
在这个例子中,表达式写为<code>\(Double(multiplier) * 2.5)</code>并包含在字符串字面量中。</p>
|
||||
<blockquote>
|
||||
<p>注意:</p>
|
||||
<p>您插值字符串中写在括号中的表达式不能包含非转义双引号 (<code>"</code>) 和反斜杠 (<code>\</code>),并且不能包含回车或换行符。</p>
|
||||
<p>插值字符串中写在括号中的表达式不能包含非转义双引号 (<code>"</code>) 和反斜杠 (<code>\</code>),并且不能包含回车或换行符。</p>
|
||||
</blockquote>
|
||||
<p><a name="comparing_strings"></a></p>
|
||||
<h2 id="-comparing-strings-">比较字符串 (Comparing Strings)</h2>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/03_Strings_and_Characters.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="集合类型 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="集合类型 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.4" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.4" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,9 +587,13 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6477">
|
||||
<section class="normal" id="section-gitbook_104">
|
||||
|
||||
<h1 id="-collection-types-">集合类型 (Collection Types)</h1>
|
||||
<blockquote>
|
||||
<p>翻译:zqp</p>
|
||||
<p>校对:shinyzhu</p>
|
||||
</blockquote>
|
||||
<h1 id="-collection-types-">集合类型 (Collection Types)</h1>
|
||||
<hr>
|
||||
<p>本页包含内容:</p>
|
||||
<ul>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/04_Collection_Types.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="控制流 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="控制流 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.5" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.5" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,10 +587,10 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6479">
|
||||
<section class="normal" id="section-gitbook_106">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:vclwei, @coverxit, @NicePiao</p>
|
||||
<p>翻译:vclwei, coverxit, NicePiao</p>
|
||||
<p>校对:coverxit</p>
|
||||
</blockquote>
|
||||
<h1 id="-">控制流</h1>
|
||||
@ -599,10 +599,8 @@
|
||||
<ul>
|
||||
<li><a href="#for_loops">For 循环</a></li>
|
||||
<li><a href="#while_loops">While 循环</a></li>
|
||||
<li><p><a href="#conditional_statement">条件语句</a></p>
|
||||
</li>
|
||||
<li><p><a href="#control_transfer_statements">控制传递语句(Control Transfer Statements)</a></p>
|
||||
</li>
|
||||
<li><a href="#conditional_statement">条件语句</a></li>
|
||||
<li><a href="#control_transfer_statements">控制传递语句(Control Transfer Statements)</a></li>
|
||||
</ul>
|
||||
<p>Swift提供了类似 C 语言的流程控制结构,包括可以多次执行任务的<code>for</code>和<code>while</code>循环,基于特定条件选择执行不同代码分支的<code>if</code>和<code>switch</code>语句,还有控制流程跳转到其他代码的<code>break</code>和<code>continue</code>语句。</p>
|
||||
<p>除了 C 语言里面传统的for条件递增(<code>for-condition-increment</code>)循环,Swift 还增加了<code>for-in</code>循环,用来更简单地遍历数组(array),字典(dictionary),区间(range),字符串(string)和其他序列类型。</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/05_Control_Flow.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="函数 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="函数 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.6" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.6" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6481">
|
||||
<section class="normal" id="section-gitbook_108">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:honghaoz</p>
|
||||
@ -832,7 +832,7 @@ let paddedString = alignRight(originalString, 10, "-")
|
||||
<p>你只能传入一个变量作为输入输出参数。你不能传入常量或者字面量(literal value),因为这些量是不能被修改的。当传入的参数作为输入输出参数时,需要在参数前加<code>&</code>符,表示这个值可以被函数修改。</p>
|
||||
<blockquote>
|
||||
<p>注意:</p>
|
||||
<p>输入输出参数不能有默认值,而且变量参数不能用 <code>inout</code> 标记。如果你用 <code>inout</code> 标记一个参数,这个参数不能别 <code>var</code> 或者 <code>let</code> 标记。</p>
|
||||
<p>输入输出参数不能有默认值,而且可变参数不能用 <code>inout</code> 标记。如果你用 <code>inout</code> 标记一个参数,这个参数不能被 <code>var</code> 或者 <code>let</code> 标记。</p>
|
||||
</blockquote>
|
||||
<p>下面是例子,<code>swapTwoInts</code> 函数,有两个分别叫做 <code>a</code> 和 <code>b</code> 的输出输出参数:</p>
|
||||
<pre><code>func swapTwoInts(inout a: Int, inout b: Int) {
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/06_Functions.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="闭包 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="闭包 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.7" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.7" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6483">
|
||||
<section class="normal" id="section-gitbook_110">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:wh1100717</p>
|
||||
@ -610,7 +610,7 @@ Swift 中的闭包与 C 和 Objective-C 中的代码块(blocks)以及其他
|
||||
<p>注意:</p>
|
||||
<p>如果您不熟悉捕获(capturing)这个概念也不用担心,您可以在 <a href="#capturing_values">值捕获</a> 章节对其进行详细了解。</p>
|
||||
</blockquote>
|
||||
<p>在<a href="../chapter2/06_Function.html">函数</a> 章节中介绍的全局和嵌套函数实际上也是特殊的闭包,闭包采取如下三种形式之一:</p>
|
||||
<p>在<a href="../chapter2/06_Functions.html">函数</a> 章节中介绍的全局和嵌套函数实际上也是特殊的闭包,闭包采取如下三种形式之一:</p>
|
||||
<ul>
|
||||
<li>全局函数是一个有名字但不会捕获任何值的闭包</li>
|
||||
<li>嵌套函数是一个有名字并可以捕获其封闭函数域内值的闭包</li>
|
||||
@ -625,8 +625,7 @@ Swift 中的闭包与 C 和 Objective-C 中的代码块(blocks)以及其他
|
||||
</ul>
|
||||
<p><a name="closure_expressions"></a></p>
|
||||
<h2 id="-closure-expressions-">闭包表达式(Closure Expressions)</h2>
|
||||
<p><a href="../chapter2/06_Function.html#nested_function">嵌套函数</a> 是一个在较复杂函数中方便进行命名和定义自包含代码模块的方式。
|
||||
当然,有时候撰写小巧的没有完整定义和命名的类函数结构也是很有用处的,尤其是在您处理一些函数并需要将另外一些函数作为该函数的参数时。</p>
|
||||
<p><a href="../chapter2/06_Functions.html#nested_function">嵌套函数</a> 是一个在较复杂函数中方便进行命名和定义自包含代码模块的方式。当然,有时候撰写小巧的没有完整定义和命名的类函数结构也是很有用处的,尤其是在您处理一些函数并需要将另外一些函数作为该函数的参数时。</p>
|
||||
<p>闭包表达式是一种利用简洁语法构建内联闭包的方式。
|
||||
闭包表达式提供了一些语法优化,使得撰写闭包变得简单明了。
|
||||
下面闭包表达式的例子通过使用几次迭代展示了<code>sort</code>函数定义和语法优化的方式。
|
||||
@ -757,8 +756,7 @@ let numbers = [16, 58, 510]
|
||||
// 其值为 ["OneSix", "FiveEight", "FiveOneZero"]
|
||||
</code></pre><p><code>map</code>在数组中为每一个元素调用了闭包表达式。
|
||||
您不需要指定闭包的输入参数<code>number</code>的类型,因为可以通过要映射的数组类型进行推断。</p>
|
||||
<p>闭包<code>number</code>参数被声明为一个变量参数(变量的具体描述请参看<a href="../chapter2/06_Functions.html#closure_expression_syntax">常量参数和变量参数</a>),因此可以在闭包函数体内对其进行修改。
|
||||
闭包表达式制定了返回类型为<code>String</code>,以表明存储映射值的新数组类型为<code>String</code>。</p>
|
||||
<p>闭包<code>number</code>参数被声明为一个变量参数(变量的具体描述请参看<a href="../chapter2/06_Functions.html#constant_and_variable_parameters">常量参数和变量参数</a>),因此可以在闭包函数体内对其进行修改。闭包表达式制定了返回类型为<code>String</code>,以表明存储映射值的新数组类型为<code>String</code>。</p>
|
||||
<p>闭包表达式在每次被调用的时候创建了一个字符串并返回。
|
||||
其使用求余运算符 (number % 10) 计算最后一位数字并利用<code>digitNames</code>字典获取所映射的字符串。</p>
|
||||
<blockquote>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/07_Closures.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="枚举 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="枚举 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.8" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.8" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6485">
|
||||
<section class="normal" id="section-gitbook_112">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:yankuangshi</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/08_Enumerations.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="类和结构体 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="类和结构体 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.9" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.9" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6487">
|
||||
<section class="normal" id="section-gitbook_114">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:JaySurplus</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/09_Classes_and_Structures.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="属性 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="属性 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.10" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.10" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6488">
|
||||
<section class="normal" id="section-gitbook_115">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:shinyzhu</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/10_Properties.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="方法 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="方法 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.11" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.11" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,11 +587,11 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6490">
|
||||
<section class="normal" id="section-gitbook_117">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:pp-prog</p>
|
||||
<p>校对:地</p>
|
||||
<p>校对:zqp</p>
|
||||
</blockquote>
|
||||
<h1 id="-methods-">方法(Methods)</h1>
|
||||
<hr>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/11_Methods.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="附属脚本 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="附属脚本 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.12" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.12" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6492">
|
||||
<section class="normal" id="section-gitbook_119">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:siemenliu</p>
|
||||
@ -634,7 +634,7 @@ let threeTimesTable = TimesTable(multiplier: 3)
|
||||
println("3的6倍是\(threeTimesTable[6])")
|
||||
// 输出 "3的6倍是18"
|
||||
</code></pre><p>在上例中,通过<code>TimesTable</code>结构体创建了一个用来表示索引值三倍的实例。数值<code>3</code>作为结构体<code>构造函数</code>入参初始化实例成员<code>multiplier</code>。</p>
|
||||
<p>你可以通过附属脚本来来得到结果,比如<code>threeTimesTable[6]</code>。这句话访问了<code>threeTimesTable</code>的第六个元素,返回<code>18</code>或者<code>6</code>的<code>3</code>倍。</p>
|
||||
<p>你可以通过附属脚本来得到结果,比如<code>threeTimesTable[6]</code>。这条语句访问了<code>threeTimesTable</code>的第六个元素,返回<code>6</code>的<code>3</code>倍即<code>18</code>。</p>
|
||||
<blockquote>
|
||||
<p>注意:</p>
|
||||
<p><code>TimesTable</code>例子是基于一个固定的数学公式。它并不适合开放写权限来对<code>threeTimesTable[someIndex]</code>进行赋值操作,这也是为什么附属脚本只定义为只读的原因。</p>
|
||||
@ -649,7 +649,7 @@ numberOfLegs["bird"] = 2
|
||||
<p>更多关于字典(Dictionary)附属脚本的信息请参考<a href="../chapter2/04_Collection_Types.html">读取和修改字典</a></p>
|
||||
<blockquote>
|
||||
<p>注意:</p>
|
||||
<p>Swift 中字典的附属脚本实现中,在<code>get</code>部分返回值是<code>Int?</code>,上例中的<code>numberOfLegs</code>字典通过下边返回的是一个<code>Int?</code>或者说“可选的int”,不是每个字典的索引都能得到一个整型值,对于没有设过值的索引的访问返回的结果就是<code>nil</code>;同样想要从字典实例中删除某个索引下的值也只需要给这个索引赋值为<code>nil</code>即可。</p>
|
||||
<p>Swift 中字典的附属脚本实现中,在<code>get</code>部分返回值是<code>Int?</code>,上例中的<code>numberOfLegs</code>字典通过附属脚本返回的是一个<code>Int?</code>或者说“可选的int”,不是每个字典的索引都能得到一个整型值,对于没有设过值的索引的访问返回的结果就是<code>nil</code>;同样想要从字典实例中删除某个索引下的值也只需要给这个索引赋值为<code>nil</code>即可。</p>
|
||||
</blockquote>
|
||||
<p><a name="subscript_options"></a></p>
|
||||
<h2 id="-">附属脚本选项</h2>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/12_Subscripts.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="继承 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="继承 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.13" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.13" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6471">
|
||||
<section class="normal" id="section-gitbook_98">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:Hawstein</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/13_Inheritance.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="构造过程 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="构造过程 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.14" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.14" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6496">
|
||||
<section class="normal" id="section-gitbook_123">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:lifedim</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/14_Initialization.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="析构过程 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="析构过程 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.15" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.15" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6498">
|
||||
<section class="normal" id="section-gitbook_125">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:bruce0505</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/15_Deinitialization.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="自动引用计数 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="自动引用计数 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.16" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.16" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6500">
|
||||
<section class="normal" id="section-gitbook_127">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:TimothyYe</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/16_Automatic_Reference_Counting.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="可选链 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="可选链 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.17" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.17" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6502">
|
||||
<section class="normal" id="section-gitbook_129">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:Jasonbroker</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/17_Optional_Chaining.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="类型检查 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="类型检查 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.18" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.18" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6504">
|
||||
<section class="normal" id="section-gitbook_131">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:xiehurricane</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/18_Type_Casting.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="类型嵌套 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="类型嵌套 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.19" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.19" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6506">
|
||||
<section class="normal" id="section-gitbook_133">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:Lin-H</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/19_Nested_Types.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="扩展 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="扩展 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.20" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.20" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6508">
|
||||
<section class="normal" id="section-gitbook_135">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:lyuka</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/20_Extensions.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="协议 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="协议 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.21" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.21" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6510">
|
||||
<section class="normal" id="section-gitbook_137">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:geek5nan</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/21_Protocols.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="泛型 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="泛型 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.22" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.22" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6512">
|
||||
<section class="normal" id="section-gitbook_139">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:takalard</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter2/22_Generics.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="高级操作符 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="高级操作符 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2.23" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2.23" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6514">
|
||||
<section class="normal" id="section-gitbook_141">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:xielingwang</p>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
<link rel="prev" href="../chapter1/02_a_swift_tour.html" />
|
||||
|
||||
|
||||
<meta property="og:title" content="Swift 教程 | 这一次,让中国和世界同步">
|
||||
<meta property="og:site_name" content="这一次,让中国和世界同步">
|
||||
<meta property="og:title" content="Swift 教程 | Swift 编程语言">
|
||||
<meta property="og:site_name" content="Swift 编程语言">
|
||||
<meta property="og:type" content="book">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="2" data-basepath=".." data-revision="1402523087598">
|
||||
<div class="book" data-level="2" data-basepath=".." data-revision="1402550478518">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -98,7 +98,7 @@
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<a href="../" >这一次,让中国和世界同步</a>
|
||||
<a href="../" >Swift 编程语言</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6516">
|
||||
<section class="normal" id="section-gitbook_143">
|
||||
|
||||
<h1 id="swift-">Swift 教程</h1>
|
||||
<p>本章介绍了 Swift 的各种特性及其使用方法,是全书的核心部分。</p>
|
||||
|
||||
Reference in New Issue
Block a user