# CS193p 2020 SwiftUI 好想 iOS camp 共筆 website: https://cs193p.sites.stanford.edu/ ## Lecture 1: Course Logistics and Introduction to SwiftUI {%youtube jbtqIBpUG7g%} ## Lecture 2: MVVM and the Swift Type System {%youtube 4GjXq2Sr55Q %} > `private(set)` 是把門關上, 但是門是玻璃門. > > `rardContentFactory: (Int) -> Content` > > property runs before self 編譯錯誤 > > constrain and gain - 1:33:40 @ Identifable > ``` cmd + E using selection for find cmd + G find next ``` 作業繳交區: Reading 1: https://cs193p.sites.stanford.edu/sites/g/files/sbiybj16636/files/media/file/r1.pdf Assignment 1: https://cs193p.sites.stanford.edu/sites/g/files/sbiybj16636/files/media/file/a1.pdf | 日期 | 繳交人 | GitHub 連結 | | -------- | -------- | -------- | | 2020/05/27 | 游諭 | https://github.com/ytyubox/CS193pMemorize | ## Lecture 3: Reactive UI + Protocols + Layout {%youtube SIYdYpPXil4 %} > Declarative programming / imperative programming > local variable in `body: some View` / private computed valiable in `struct MyView:View` ObservableObject and @ObservedObjcet Layout layoutPriority 可以覆寫 layout 系統 magic number 1. RoundedRectangle cornerRadius 2. font * 0.75 -> drawing constants property 使用 body func 作為 `self` 的取代 ```swift func body(for size:CGSize) -> some View ``` ## Lecture 4: Grid + enum + Optionals {%youtube eHEeWzFP6O4 %} | 日期 | 繳交人 | GitHub 連結 | | -------- | -------- | -------- | | 2020/05/30 | 游諭 | https://github.com/ytyubox/CS193pMemorize | ## Lecture 5: ViewBuilder + Shape + ViewModifier {%youtube oDKDGCRdSHc %} * ViewModifier ## Lecture 6: Animation {%youtube 3krC2c56ceQ %} ## Lecture 7: Multithreading EmojiArt {%youtube tmx-OwkBWxA %} ## Lecture 8: Gestures JSON {%youtube mz-rNLWJ0bk %}