Swift2.0 文法改動詳細說明
文檔管理者:PMST
目前版本:V1.0.2
最後更新日期:2015.08.12
注:[New]表示更新内容,此外有優秀文章、資源、架構等等,都可以推薦給我,發送到我的郵箱。
郵箱位址連結:[email protected]
[8-06改動日志]
- 更新Representing Error章節,所有類型都能夠遵循ErrorType協定
- 增加新内容到Overriding a Failable Initializer章節
- 新增關于使用枚舉案例到Enumerations with cases of any Type章節
- Initializer Expresssion章節新增内容詳細介紹初始化構造器。
- 新增有關建構配置和線控制内容到Compiler Control Statements,這是什麼gui…
- Metatype Type新增一個注意點NOTE
- 弱引用章節 新增一個NOTE.
- 類型屬性章節更新了以前的一個NOTE
[7-21改動日志]
- 新增遞歸枚舉内容到Enumerations章節的Recursive Enumerations塊;此外還有Declarations章節中的Enumerations with cases of Any Type小節也進行了部分修改.
- 增加關于String raw Value 内容到Enumerations章節中的 Implicitly Assigned Raw Values一節中,此外還有Declarations章節中的Enumerations with cases of a Raw-Value一節也有少許改動.
- 更新了章節Capturing Values,差別在閉包中如何擷取變量和常量。
- 更新了Declaration Attributes章節中對@objc屬性來修飾class.
- Catching and handling Errors章節新增一個note注意點,是關于執行throw時效率問題。至于Do Statement章節少于改動
[6-08改動日志]
- 新增内容到Error Handling一節、Do Statement部分、Throw Statement部分、Defer Statement部分以及Try Operator部分.
- Control Flow章節新增Checking API Availability部分,介紹API可用性檢查;Statements章節新增Availability部分.
- 新增文法guard到Control Flow章節中的Early Exit部分,以及Statements章節中的Guard Statement.
- Protocols章節新增Protocol Extensions部分,介紹協定擴充。
- Access Control章節中Access Levels for Unit Test Targets部分,新增内容介紹單元測試的通路控制
- Patterns章節中Optional Pattern部分增加新的可選類型比對.
- 更新了Repeat-While章節内容,更改文法do-while為repeat-while.
- 更新了Type Properties章節有關class(類)、structures(結構體)以及enumerations(枚舉)内容
- Break Statement章節更新内容,通過标簽來指定中斷。
- Declaration Attributes章節新增關于@available、warn_unused_result屬性
- Type Attributes章節更新@convention屬性内容.
- Property Observers章節更新
,明确區分willSet以及didSet屬性觀察者Note
- Access Levels章節新增一個
用以說明private的作用域.Note
- Weak References章節新增
,用以區分垃圾回收機制和ARC機制之間的弱引用。Note
- Special Characters in String Literals章節更新相關内容。
- 更新Strings and Characters部分,Swift 标準庫中String類型不再遵循CollectionType協定.
具體改動,可詳見跳轉内容,本人時間有限,簡單翻譯了官網中Revision History 6-08更新内容,翻譯有誤之處敬請諒解!!
Swift2.0 學習筆記 github位址,均為官方改動學習demo,并加上完整注釋,倘若您覺得還不錯 給star下[New!!!]