update 03/07
This commit is contained in:
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="1.1" data-basepath=".." data-revision="1402267410054">
|
||||
<div class="book" data-level="1.1" data-basepath=".." data-revision="1402287112409">
|
||||
<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>
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_4">
|
||||
<section class="normal" id="section-gitbook_36">
|
||||
|
||||
<h1 id="-swift">关于 Swift</h1>
|
||||
<p>Swift 是一种新的编程语言,用于编写 iOS 和 OS X 应用。Swift 结合了 C 和 Objective-C 的优点并且不受C的兼容性的限制。Swift 使用安全的编程模式并添加了很多新特性,这将使编程更简单,扩展性更强,也更有趣。除此之外,Swift 还支持人见人爱的 Cocoa 和 Cocoa Touch 框架。拥有了这些特性,Swift将重新定义软件开发。</p>
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="1.2" data-basepath=".." data-revision="1402267410054">
|
||||
<div class="book" data-level="1.2" data-basepath=".." data-revision="1402287112409">
|
||||
<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>
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_5">
|
||||
<section class="normal" id="section-gitbook_37">
|
||||
|
||||
<h1 id="swift-">Swift 初见</h1>
|
||||
<p>本页内容包括:</p>
|
||||
@ -662,7 +662,7 @@ for score in individualScores {
|
||||
}
|
||||
teamScore
|
||||
</code></pre><p>在<code>if</code>语句中,条件必须是一个布尔表达式——这意味着像<code>if score { ... }</code>这样的代码将报错,而不会隐形地与 0 做对比。</p>
|
||||
<p>你可以一起使用<code>if</code>和<code>let</code>来处理值缺失的情况。有些变量的值是可选的。一个可选的值可能是一个具体的值或者是<code>nil</code>,表示值缺失。在类型后面加一个问号来标记这个变量的值是可选的。</p>
|
||||
<p>你可以一起使用<code>if</code>和<code>let</code>来处理值缺失的情况。有些变量的值是可选的。一个可选的值可能是一个具体的值或者是<code>nil</code>,表示值缺失。在类型后面加一个<code>?</code>来标记这个变量的值是可选的。</p>
|
||||
<pre><code>var optionalString: String? = "Hello"
|
||||
optionalString == nil
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="1" data-basepath=".." data-revision="1402267410054">
|
||||
<div class="book" data-level="1" data-basepath=".." data-revision="1402287112409">
|
||||
<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>
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_6">
|
||||
<section class="normal" id="section-gitbook_38">
|
||||
|
||||
<h1 id="-swift">欢迎使用 Swift</h1>
|
||||
<p>在本章中您将了解 Swift 的特性和开发历史,并对 Swift 有一个初步的了解。</p>
|
||||
|
||||
Reference in New Issue
Block a user