Files
the-swift-programming-langu…/chapter2/the_basics.html
2014-06-04 11:20:45 +08:00

272 lines
8.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML>
<html lang="en-US" manifest="../manifest.appcache">
<head prefix="og: http://ogp.me/ns# book: http://ogp.me/ns/book#">
<meta charset="UTF-8">
<title>Swift教程 | Swift编程语言</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="robots" content="index, follow">
<meta name="author" content="">
<meta name="description" content="Swift是苹果在WWDC2014上发布的一款全新的编程语言本书译自苹果官方的Swift教程《The Swift Programming Language》。">
<meta name="keywords" content="gitbook,github" >
<meta name="generator" content="www.gitbook.io">
<link rel="next" href="../chapter2/article_1.html" />
<link rel="prev" href="../a_swift_tour.html" />
<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">
<meta property="book:author" content="https://github.com/">
<meta property="book:tag" content="GitBook">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
</head>
<body>
<link rel="stylesheet" href="../gitbook/style.css">
<div class="book" data-level="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>
<a href="https://github.com/null" target="_blank" class="btn pull-left home-bookmark" aria-label="GitHub home"><i class="fa fa-bookmark-o"></i></a>
<a href="#" class="btn pull-left toggle-search" aria-label="Toggle search"><i class="fa fa-search"></i></a>
<span id="font-settings-wrapper">
<a href="#" class="btn pull-left toggle-font-settings" aria-label="Toggle font settings"><i class="fa fa-font"></i>
</a>
<div class="dropdown-menu font-settings">
<div class="dropdown-caret">
<span class="caret-outer"></span>
<span class="caret-inner"></span>
</div>
<div class="btn-group btn-block">
<button id="reduce-font-size" class="btn btn-default">A</button>
<button id="enlarge-font-size" class="btn btn-default">A</button>
</div>
<ul class="list-group font-family-list">
<li class="list-group-item" data-font="0">Serif</li>
<li class="list-group-item" data-font="1">Sans</li>
</ul>
<div class="btn-group btn-group-xs btn-block color-theme-list">
<button type="button" class="btn btn-default" id="color-theme-preview-0" data-theme="0">White</button>
<button type="button" class="btn btn-default" id="color-theme-preview-1" data-theme="1">Sepia</button>
<button type="button" class="btn btn-default" id="color-theme-preview-2" data-theme="2">Night</button>
</div>
</div>
</span>
<!-- Actions Right -->
<a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Share on Google Plus"><i class="fa fa-google-plus"></i></a>
<a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Share on Facebook"><i class="fa fa-facebook"></i></a>
<a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Share on Twitter"><i class="fa fa-twitter"></i></a>
<!-- Title -->
<h1>
<i class="fa fa-spinner fa-spin"></i>
<a href="../" >Swift编程语言</a>
</h1>
</div>
<div class="book-summary">
<div class="book-search">
<input type="text" placeholder="Search" class="form-control" />
</div>
<ul class="summary">
<li data-level="0" data-path="index.html">
<a href="../"><i class="fa fa-check"></i> Introduction</a>
</li>
<li class="chapter " data-level="1" data-path="swift/README.html">
<a href="../swift/README.html">
<i class="fa fa-check"></i> <b>1.</b> 欢迎使用Swift
</a>
<ul class="articles">
<li class="chapter " data-level="1.1" data-path="swift/swift.html">
<a href="../swift/swift.html">
<i class="fa fa-check"></i> <b>1.1.</b> 关于Swift
</a>
</li>
<li class="chapter " data-level="1.2" data-path="a_swift_tour.html">
<a href="../a_swift_tour.html">
<i class="fa fa-check"></i> <b>1.2.</b> Swift初见
</a>
</li>
</ul>
</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>
<li class="divider"></li>
<li>
<a href="http://www.gitbook.io/" target="blank" class="gitbook-link">Generated using GitBook</a>
</li>
</ul>
</div>
<div class="book-body">
<div class="body-inner">
<div class="page-wrapper" tabindex="-1">
<div class="book-progress">
<div class="bar">
<div class="inner" style="width: 80%;min-width: 60%;"></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: 20%;"></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: 60%;"></a>
<a href="../chapter2/the_basics.html" title="Swift教程" class="chapter done 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_1205">
<h1 id="swift-">Swift教程</h1>
<p>本章介绍了Swift的各种特性及其使用方法是全书的核心部分。</p>
</section>
</div>
</div>
</div>
<a href="../a_swift_tour.html" class="navigation navigation-prev " aria-label="Previous page: Swift初见"><i class="fa fa-angle-left"></i></a>
<a href="../chapter2/article_1.html" class="navigation navigation-next " aria-label="Next page: 基础部分"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="http://cdn.bootcss.com/ace/1.1.3/ace.js"></script>
<script src="http://cdn.bootcss.com/ace/1.1.3/mode-javascript.js"></script>
<script src="../gitbook/jsrepl/jsrepl.js" id="jsrepl-script"></script>
<script src="../gitbook/app.js"></script>
<script src="../gitbook/plugins/gitbook-plugin-mixpanel/plugin.js"></script>
<script src="http://cdn.mathjax.org/mathjax/2.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="../gitbook/plugins/gitbook-plugin-mathjax/plugin.js"></script>
<script>
require(["gitbook"], function(gitbook) {
var config = {};
gitbook.start(config);
});
</script>
</body>
</html>