# cs193p-2020-swiftui **Repository Path**: timiny/cs193p-2020-swiftui ## Basic Information - **Project Name**: cs193p-2020-swiftui - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-23 - **Last Updated**: 2021-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![image](header.png) Lecturer: **[Paul Hegarty](https://www.quora.com/Who-is-Paul-Hegarty-from-Stanford-CS193)** ## Lecture 1: Course Logistics and Intro to SwiftUI [Video](https://youtu.be/jbtqIBpUG7g) [Slides](./documents/Slides/l1.pdf) ## Lecture 2: MVVM and the Swift Type System [Video](https://youtu.be/4GjXq2Sr55Q) - [MVVM](https://youtu.be/4GjXq2Sr55Q?t=40) - [struct vs class](https://youtu.be/4GjXq2Sr55Q?t=1205) - [Copy on write](https://youtu.be/4GjXq2Sr55Q?t=1248) - [Generics](https://youtu.be/4GjXq2Sr55Q?t=1730) - [Functions as Types](https://youtu.be/4GjXq2Sr55Q?t=1971) [Slides](./documents/Slides/l2.pdf) [Reading 1](./documents/Readings/r1.pdf) [Assignment 1](./documents/Assignments/a1.pdf) ## Lecture 3: Reactive UI + Protocols + Layout [Video](https://youtu.be/SIYdYpPXil4) - [Protocols](https://youtu.be/SIYdYpPXil4?t=2065) - [Protocols and Generics](https://youtu.be/SIYdYpPXil4?t=2694) - [Layout](https://youtu.be/SIYdYpPXil4?t=3176) - [GeometryReader](https://youtu.be/SIYdYpPXil4?t=4207) [Slides](./documents/Slides/l3.pdf) ## Lecture 4: Grid + enum + Optionals [Video](https://youtu.be/eHEeWzFP6O4) - [@esacping](https://www.youtube.com/watch?v=eHEeWzFP6O4&feature=youtu.be&t=515) - [enum](https://youtu.be/eHEeWzFP6O4?t=1973) - [Optional](https://youtu.be/eHEeWzFP6O4?t=2453) - [Equatable](https://youtu.be/eHEeWzFP6O4?t=3808) [Slides](./documents/Slides/l4.pdf) [Reading 2](./documents/Readings/r2.pdf) [Assignment 2](./documents/Assignments/a2.pdf) ## Lecture 5: ViewBuilder + Shape + ViewModifier [Video](https://www.youtube.com/watch?v=oDKDGCRdSHc) - [private(set)](https://youtu.be/oDKDGCRdSHc?t=282) - [@ViewBuilder](https://youtu.be/oDKDGCRdSHc?t=725) - [Shape](https://youtu.be/oDKDGCRdSHc?t=1226) - [ViewModifier](https://youtu.be/oDKDGCRdSHc?t=2555) [Slides](./documents/Slides/l5.pdf) ## Lecture 6: Animation [Video](https://www.youtube.com/watch?v=3krC2c56ceQ) - [Property Observer](https://youtu.be/3krC2c56ceQ?t=43) - [@State](https://youtu.be/3krC2c56ceQ?t=119) - [Implicit("automatic") Animation](https://youtu.be/3krC2c56ceQ?t=716) - [Explicit Animation](https://youtu.be/3krC2c56ceQ?t=1048) - [Explicit Animation Demo](https://youtu.be/3krC2c56ceQ?t=3055) - [Transitions](https://youtu.be/3krC2c56ceQ?t=1253) - [AnimatableModifier](https://youtu.be/3krC2c56ceQ?t=3856) [Slides](./documents/Slides/l6.pdf) [Reading 3](./documents/Readings/r3.pdf) [Assignment 3](./documents/Assignments/a3.pdf) ## Lecture 7: Multithreading EmojiArt [Video](https://youtu.be/tmx-OwkBWxA) - [Multithreading](https://youtu.be/tmx-OwkBWxA?t=378) - [Threads & Queues](https://youtu.be/tmx-OwkBWxA?t=474) - [GCD](https://youtu.be/tmx-OwkBWxA?t=716) - [fileprivate](https://youtu.be/tmx-OwkBWxA?t=2822) [Slides](./documents/Slides/l7.pdf) ## Lecture 8: Gestures JSON [Video](https://youtu.be/mz-rNLWJ0bk) - [UserDefaults](https://youtu.be/mz-rNLWJ0bk?t=175) - [Gestures](https://youtu.be/mz-rNLWJ0bk?t=526) - [Discrete Gestures](https://youtu.be/mz-rNLWJ0bk?t=694) - [Non-Discrete Gestures](https://youtu.be/mz-rNLWJ0bk?t=757) - [User Defaults won't write to disk right away](https://youtu.be/mz-rNLWJ0bk?t=2397) - [inout gesture state](https://youtu.be/mz-rNLWJ0bk?t=3906) [Slides](./documents/Slides/l8.pdf) [Assignment 4](./documents/Assignments/a4.pdf) [Assignment 5](./documents/Assignments/a5.pdf) ## Lecture 9: Data Flow [Video](https://youtu.be/0i152oA3T3s) - [Property Wrappers](https://youtu.be/0i152oA3T3s?t=60) - [@State](https://youtu.be/0i152oA3T3s?t=376) - [@ObservedObject](https://youtu.be/0i152oA3T3s?t=443) - [@Binding](https://youtu.be/0i152oA3T3s?t=492) - [@EnvironmentObject](https://youtu.be/0i152oA3T3s?t=746) - [@Environment](https://youtu.be/0i152oA3T3s?t=934) - [@Publisher](https://youtu.be/0i152oA3T3s?t=1108) - [.sink{}/AnyCancellable](https://youtu.be/0i152oA3T3s?t=2212) - [.onReceive{}](https://youtu.be/0i152oA3T3s?t=2570) - [Publisher + URLSession(dataTaskPublisher)](https://youtu.be/0i152oA3T3s?t=2698) [Slides](./documents/Slides/l9.pdf) ## Lecture 10: Modal Presentation and Navigation [Video](https://youtu.be/CKexGQuIO7E) - [Initialize @State var in initializer](https://youtu.be/CKexGQuIO7E?t=213) - [Share viewmodel via @EnviromentObject](https://youtu.be/CKexGQuIO7E?t=1011) - [Form](https://youtu.be/CKexGQuIO7E?t=1648) - [KeyPath](https://youtu.be/CKexGQuIO7E?t=2005) - [Hashable/Equatable/Identifiable](https://youtu.be/CKexGQuIO7E?t=3278) - [@EnvironmentObject](https://youtu.be/CKexGQuIO7E?t=3728) - [List](https://youtu.be/CKexGQuIO7E?t=3830) - [Inject EnvironmentObject](https://youtu.be/CKexGQuIO7E?t=3861) - [Navigation Link](https://youtu.be/CKexGQuIO7E?t=4033) - [Alert](https://youtu.be/CKexGQuIO7E?t=4785) - [Swipe to Delete](https://youtu.be/CKexGQuIO7E?t=5331) - [Edit Mode](https://youtu.be/CKexGQuIO7E?t=5467) - [Set environment](https://youtu.be/CKexGQuIO7E?t=5663) - [.zIndex()](https://youtu.be/CKexGQuIO7E?t=6102) [Slides](./documents/Slides/l10.pdf) [Assignment 6](./documents/Assignments/a6.pdf) ## Lecture 11: Enroute Picker [Video](https://youtu.be/fCfC6m7XUew) - [Init a @Binding var(using \_var)](https://youtu.be/fCfC6m7XUew?t=1558) - [Init @State with wrappedValue](https://youtu.be/fCfC6m7XUew?t=1770) - [Picker](https://youtu.be/fCfC6m7XUew?t=1861) - [Picker in Form](https://youtu.be/fCfC6m7XUew?t=2155) - [Picker and .tag()](https://youtu.be/fCfC6m7XUew?t=2680) - [Toggle in Form](https://youtu.be/fCfC6m7XUew?t=2904) [Slides](./documents/Slides/l11.pdf) ## Lecture 12: Core Data [Video](https://youtu.be/yOhyOpXvaec) - [Core Data Features](https://youtu.be/yOhyOpXvaec?t=265) - [SwiftUI Integration](https://youtu.be/yOhyOpXvaec?t=304) - [Read/Write data](https://youtu.be/yOhyOpXvaec?t=737) - [@FetchRequest](https://youtu.be/yOhyOpXvaec?t=1009) - [Build Objects Graph in Core Data](https://youtu.be/yOhyOpXvaec?t=1610) - [Fetch/Create Object](https://youtu.be/yOhyOpXvaec?t=2361) - [NSPredicate](https://youtu.be/yOhyOpXvaec?t=2442) - [NSSortDescriptor](https://youtu.be/yOhyOpXvaec?t=2521) - [Deal with NSSet of one to many relationship](https://youtu.be/yOhyOpXvaec?t=3255) - [Deal with non-optional value](https://youtu.be/yOhyOpXvaec?t=3499) - [@FetchRequest demo](https://youtu.be/yOhyOpXvaec?t=3762) - [Init @FetchRequest](https://youtu.be/yOhyOpXvaec?t=3926) - [TRUEPREDICATE](https://youtu.be/yOhyOpXvaec?t=4884) - [Crash Error: Context in environment is not connected to a persistent store coordinator](https://youtu.be/yOhyOpXvaec?t=5160) - [Build a programmatic NSPredicate](https://youtu.be/yOhyOpXvaec?t=5406) [Slides](./documents/Slides/l12.pdf) ## Lecture 13: Persistence [Video](https://youtu.be/fTNPRhGGP-0) - [Persistence Overview](https://youtu.be/fTNPRhGGP-0?t=112) - [Cloud Kit](https://youtu.be/fTNPRhGGP-0?t=332) - [Create a record in Cloud Kit](https://youtu.be/fTNPRhGGP-0?t=840) - [Query for records](https://youtu.be/fTNPRhGGP-0?t=1173) - [File System](https://youtu.be/fTNPRhGGP-0?t=1319) - [Sandbox](https://youtu.be/fTNPRhGGP-0?t=1452) - [File Manager](https://youtu.be/fTNPRhGGP-0?t=1610) [Slides](./documents/Slides/l13.pdf) ## Lecture 14: UIKit Integration [Video](https://youtu.be/GRX5Dha_Clw) [Slides](./documents/Slides/l14.pdf)