MemoryLayout
MemoryLayout
MemoryLayout
MemoryLayout
MemoryLayout
MemoryLayout
可选项
var age: Int?
强制解包
var num: Int = age!
空合并运算符
let a: Int? =1
let b: Int? =2
let c = a??b
guard 语句
当guard语句的条件为false时,会执行大括号里面的代码
当guard语句的条件为true时,跳过guard语句
guard语句特别适合“提前退出”
隐式解包
var num: Int! = 10
var tmp = num