update underscore

This commit is contained in:
numbbbbb
2014-06-10 20:07:44 +08:00
parent 930d81867c
commit 9af353f0fc
41 changed files with 103 additions and 80 deletions

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.11" data-basepath=".." data-revision="1402397411238">
<div class="book" data-level="2.11" data-basepath=".." data-revision="1402402017737">
<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,9 +587,10 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_34">
<section class="normal" id="section-gitbook_42">
<h1 id="-methods-">方法(Methods)</h1>
<h1 id="-methods-">方法Methods</h1>
<hr>
<p><strong>方法</strong>是与某些特定类型相关联的函数。类、结构体、枚举都可以定义实例方法实例方法为给定类型的实例封装了具体的任务与功能。类、结构体、枚举也可以定义类型方法类型方法与类型自身相关联。类型方法与Objective-C中的类方法(class methods)相似。</p>
<p>在Swift中,结构体和枚举能够定义方法事实上这是Swift与C/Objective-C的主要区别之一。在Objective-C中,类是唯一能定义方法的类型。但在Swift中你不仅能选择是否要定义一个类/结构体/枚举,还能灵活的在你创建的类型(类/结构体/枚举)上定义方法。</p>
<h3 id="-instance-methods-">实例方法(Instance Methods)</h3>