盡管“The Swift Programming Language”名字有點(diǎn)長(zhǎng),但這似乎并不妨礙它成為人們喜愛和追捧的對(duì)象,尤其是它的中文版,近來人氣更是水漲船高,鑒于此,本節(jié)內(nèi)容小編就為大家?guī)磉@樣一份pdf格式免費(fèi)版The Swift Programming Language中文完整版下載資料,需要swift中文版教程或是swift中文版參考手冊(cè)的朋友都可以將這樣一份The Swift Programming Language中文完整版下載資料下載下來查看一番哦!
The Swift Programming Language中文完整版下載目錄
目錄
1. 歡迎使⽤Swift .............................................................................................................. 8
1.1.關(guān)于 Swift ............................................................................................................ 8
1.2. Swift 初見............................................................................................................ 9
簡(jiǎn)單值 ............................................................................................................... 9
控制流 ............................................................................................................. 11
函數(shù)和閉包 ...................................................................................................... 14
對(duì)象和類.......................................................................................................... 16
枚舉和結(jié)構(gòu)體................................................................................................... 20
接口和擴(kuò)展 ...................................................................................................... 23
泛型................................................................................................................. 25
2. Swift 教程 .................................................................................................................. 26
2.1 基礎(chǔ)部分 ........................................................................................................... 26
常量和變量 ...................................................................................................... 27
注釋................................................................................................................. 30
分號(hào)................................................................................................................. 31
整數(shù)................................................................................................................. 31
浮點(diǎn)數(shù) ............................................................................................................. 32
類型安全和類型推測(cè) ........................................................................................ 32
數(shù)值型字面量................................................................................................... 33
數(shù)值型類型轉(zhuǎn)換 ............................................................................................... 35
類型別名.......................................................................................................... 36
布爾值 ............................................................................................................. 37
元組................................................................................................................. 38
可選................................................................................................................. 40
斷言................................................................................................................. 44
2.2. 基本運(yùn)算符 ...................................................................................................... 45
術(shù)語(yǔ)................................................................................................................. 46
賦值運(yùn)算符 ...................................................................................................... 47
數(shù)值運(yùn)算.......................................................................................................... 47
復(fù)合賦值.......................................................................................................... 51
比較運(yùn)算.......................................................................................................... 51
三目條件運(yùn)算................................................................................................... 52
區(qū)間運(yùn)算符 ...................................................................................................... 53
邏輯運(yùn)算.......................................................................................................... 54
2.3. 字符串和字符................................................................................................... 57
字符串字面量................................................................................................... 58
初始化空字符串 ............................................................................................... 59
字符串可變性................................................................................................... 59
字符串是值類型 ............................................................................................... 60
使用字符(Characters) ...................................................................................... 60
計(jì)算字符數(shù)量................................................................................................... 61
連接字符串和字符............................................................................................ 61
字符串插值 ...................................................................................................... 62
比較字符串 ...................................................................................................... 63
大寫和小寫字符串............................................................................................ 65
Unicode ........................................................................................................... 65
2.4. 集合類型.......................................................................................................... 68
數(shù)組................................................................................................................. 68
字典................................................................................................................. 74
集合的可變性................................................................................................... 79
2.5. 控制流 ............................................................................................................. 79
For 循環(huán).......................................................................................................... 80
While 循環(huán) ...................................................................................................... 84
條件語(yǔ)句.......................................................................................................... 88
控制轉(zhuǎn)移語(yǔ)句................................................................................................... 97
2.6. 函數(shù)................................................................................................................103
定義和調(diào)用函數(shù) ..............................................................................................104
函數(shù)的形參和返回值 .......................................................................................105
函數(shù)形參名 .....................................................................................................108
函數(shù)類型.........................................................................................................115
嵌套函數(shù).........................................................................................................119
2.7. 閉包................................................................................................................119
閉包表達(dá)式 .....................................................................................................120
Trailing 閉包...................................................................................................124
捕獲 (Caputure) .............................................................................................127
閉包是引用類型 ..............................................................................................129
……
The Swift Programming Language中文完整版下載相關(guān)內(nèi)容小編就為大家介紹到這里了,更多pdf格式免費(fèi)版文檔資料下載敬請(qǐng)關(guān)注東坡下載站!
- PC官方版
- 安卓官方手機(jī)版
- IOS官方手機(jī)版