add chapter2 and fix a wrong word

This commit is contained in:
numbbbbb
2014-06-04 11:20:45 +08:00
parent aee8de75c0
commit 62ea2b764b
8 changed files with 692 additions and 28 deletions

View File

@ -15,6 +15,8 @@
<meta name="generator" content="www.gitbook.io">
<link rel="next" href="./chapter2/the_basics.html" />
<link rel="prev" href="./swift/swift.html" />
@ -44,7 +46,7 @@
<div class="book" data-level="1.2" data-basepath="." data-revision="1401784865321">
<div class="book" data-level="1.2" data-basepath="." data-revision="1401851927231">
<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>
@ -154,6 +156,30 @@
</li>
<li class="chapter " data-level="2" data-path="chapter2/the_basics.html">
<a href="./chapter2/the_basics.html">
<i class="fa fa-check"></i> <b>2.</b> Swift教程
</a>
<ul class="articles">
<li class="chapter " data-level="2.1" data-path="chapter2/article_1.html">
<a href="./chapter2/article_1.html">
<i class="fa fa-check"></i> <b>2.1.</b> 基础部分
</a>
</li>
</ul>
</li>
@ -170,24 +196,28 @@
<div class="page-wrapper" tabindex="-1">
<div class="book-progress">
<div class="bar">
<div class="inner" style="width: 100%;min-width: 66.66666666666667%;"></div>
<div class="inner" style="width: 60%;min-width: 40%;"></div>
</div>
<div class="chapters">
<a href="./index.html" title="Introduction" class="chapter done new-chapter" data-progress="0" style="left: 0%;"></a>
<a href="./swift/README.html" title="欢迎使用Swift" class="chapter done new-chapter" data-progress="1" style="left: 33.333333333333336%;"></a>
<a href="./swift/README.html" title="欢迎使用Swift" class="chapter done new-chapter" data-progress="1" style="left: 20%;"></a>
<a href="./swift/swift.html" title="关于Swift" class="chapter done " data-progress="1.1" style="left: 66.66666666666667%;"></a>
<a href="./swift/swift.html" title="关于Swift" class="chapter done " data-progress="1.1" style="left: 40%;"></a>
<a href="./a_swift_tour.html" title="Swift初见" class="chapter done " data-progress="1.2" style="left: 100%;"></a>
<a href="./a_swift_tour.html" title="Swift初见" class="chapter done " data-progress="1.2" style="left: 60%;"></a>
<a href="./chapter2/the_basics.html" title="Swift教程" class="chapter new-chapter" data-progress="2" style="left: 80%;"></a>
<a href="./chapter2/article_1.html" title="基础部分" class="chapter " data-progress="2.1" style="left: 100%;"></a>
</div>
</div>
<div class="page-inner">
<section class="normal" id="section-gitbook_6111">
<section class="normal" id="section-gitbook_1203">
<h1 id="swift-">Swift初见</h1>
<p>通常来说编程语言教程中的第一个程序应该在屏幕上打印“Hello, world”。在Swift中可以用一行代码实现</p>
@ -198,7 +228,7 @@
<p>注意为了获得最好的体验在Xcode当中使用代码预览功能。代码预览功能可以让你编辑代码并实时看到运行结果。</p>
</blockquote>
<h2 id="-">简单值</h2>
<p>使用<code>let</code>来声明常量,使用<code>var</code>来声明变量。一个常量的值在编译时并不需要获取,但是你只能为它赋值以此。也就是说你可以用常量来表示这样一个值:你只需要决定一次,但是需要使用很多次。</p>
<p>使用<code>let</code>来声明常量,使用<code>var</code>来声明变量。一个常量的值在编译时并不需要获取,但是你只能为它赋值一次。也就是说你可以用常量来表示这样一个值:你只需要决定一次,但是需要使用很多次。</p>
<pre><code>var myVariable = 42
myVariable = 50
let myConstant = 42
@ -699,9 +729,11 @@ anyCommonElements([1, 2, 3], [3])
</div>
<a href="./swift/swift.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 关于Swift"><i class="fa fa-angle-left"></i></a>
<a href="./swift/swift.html" class="navigation navigation-prev " aria-label="Previous page: 关于Swift"><i class="fa fa-angle-left"></i></a>
<a href="./chapter2/the_basics.html" class="navigation navigation-next " aria-label="Next page: Swift教程"><i class="fa fa-angle-right"></i></a>
</div>
</div>