尽管“The Swift Programming Language”名字有点长,但这似乎并不妨碍它成为人们喜爱和追捧的对象,尤其是它的中文版,近来人气更是水涨船高,鉴于此,本节内容小编就为大家带来这样一份pdf格式免费版The Swift Programming Language中文完整版下载资料,需要swift中文版教程或是swift中文版参考手册的朋友都可以将这样一份The Swift Programming Language中文完整版下载资料下载下来查看一番哦!
The Swift Programming Language中文完整版下载目录
目录
1. 欢迎使⽤Swift .............................................................................................................. 8
1.1.关于 Swift ............................................................................................................ 8
1.2. Swift 初见............................................................................................................ 9
简单值 ............................................................................................................... 9
控制流 ............................................................................................................. 11
函数和闭包 ...................................................................................................... 14
对象和类.......................................................................................................... 16
枚举和结构体................................................................................................... 20
接口和扩展 ...................................................................................................... 23
泛型................................................................................................................. 25
2. Swift 教程 .................................................................................................................. 26
2.1 基础部分 ........................................................................................................... 26
常量和变量 ...................................................................................................... 27
注释................................................................................................................. 30
分号................................................................................................................. 31
整数................................................................................................................. 31
浮点数 ............................................................................................................. 32
类型安全和类型推测 ........................................................................................ 32
数值型字面量................................................................................................... 33
数值型类型转换 ............................................................................................... 35
类型别名.......................................................................................................... 36
布尔值 ............................................................................................................. 37
元组................................................................................................................. 38
可选................................................................................................................. 40
断言................................................................................................................. 44
2.2. 基本运算符 ...................................................................................................... 45
术语................................................................................................................. 46
赋值运算符 ...................................................................................................... 47
数值运算.......................................................................................................... 47
复合赋值.......................................................................................................... 51
比较运算.......................................................................................................... 51
三目条件运算................................................................................................... 52
区间运算符 ...................................................................................................... 53
逻辑运算.......................................................................................................... 54
2.3. 字符串和字符................................................................................................... 57
字符串字面量................................................................................................... 58
初始化空字符串 ............................................................................................... 59
字符串可变性................................................................................................... 59
字符串是值类型 ............................................................................................... 60
使用字符(Characters) ...................................................................................... 60
计算字符数量................................................................................................... 61
连接字符串和字符............................................................................................ 61
字符串插值 ...................................................................................................... 62
比较字符串 ...................................................................................................... 63
大写和小写字符串............................................................................................ 65
Unicode ........................................................................................................... 65
2.4. 集合类型.......................................................................................................... 68
数组................................................................................................................. 68
字典................................................................................................................. 74
集合的可变性................................................................................................... 79
2.5. 控制流 ............................................................................................................. 79
For 循环.......................................................................................................... 80
While 循环 ...................................................................................................... 84
条件语句.......................................................................................................... 88
控制转移语句................................................................................................... 97
2.6. 函数................................................................................................................103
定义和调用函数 ..............................................................................................104
函数的形参和返回值 .......................................................................................105
函数形参名 .....................................................................................................108
函数类型.........................................................................................................115
嵌套函数.........................................................................................................119
2.7. 闭包................................................................................................................119
闭包表达式 .....................................................................................................120
Trailing 闭包...................................................................................................124
捕获 (Caputure) .............................................................................................127
闭包是引用类型 ..............................................................................................129
……
The Swift Programming Language中文完整版下载相关内容小编就为大家介绍到这里了,更多pdf格式免费版文档资料下载敬请关注东坡下载站!
- PC官方版
- 安卓官方手机版
- IOS官方手机版