第1年10月9日 swiftui

1.

2020 斯坦福(Stanford)Swift 语言教程 SwiftUI 开发 

https://www.bilibili.com/video/BV1EV411C77B?p=3

 

https://swiftgg.gitbook.io/swift/swift-jiao-cheng

笔记:

swift Optional
You can access the associated value either by force (with !)...
Or "safely" using if let and then using the safely-gotten associated value in {} (else allowed too)

if let safehello = hello {
print(safehello)
} else {
//do something else
}

there's alse ?? which does "Optional defaulting"

let x: String? = ...
let y = x ?? "foo"

 

 

 

2.old

 

https://www.bilibili.com/video/av91214108?from=search&seid=10810075706072577421

 

https://github.com/mercari/mtc2018-app-SwiftUI/

 

posted @ 2021-10-09 09:41  lianhuaren  阅读(23)  评论(0编辑  收藏  举报