The lectures for the Spring 2020 version of Stanford University's course CS193p (Developing Applications for iOS using SwiftUI) were delivered to our students in an on-line fashion due to the novel coronavirus outbreak. Stanford is in the process of making those on-line video lectures available to all (two per week) via YouTube. This website was set up to give everyone access to the supporting material that was distributed to students during the quarter (homework, demo code, etc.).
For more, check out the About page.
Course Logistics and Intro to SwiftUI
After going over the mechanics of how the course works, this first lecture dives right into creating an iOS application (a card-matching game called Memorize). The Xcode development environment is used to demonstrate the basics of SwiftUI's declarative approach to composing user-interfaces.Slides
MVVM and the Swift Type System
Conceptual overview of the architectural paradigm underlying the development of applications for iOS using SwiftUI: MVVM. In addition, a key underpinning of the Swift Programming Language, its type system, is explained. The Memorize demonstration continues, incorporating MVVM.Assignment 1
Reactive UI Protocols Layout
Now that MVVM has been applied to Memorize, we can use the reactive nature of SwiftUI to make the cards flip over by processing multitouch events, updating our Model through our ViewModel and having our UI stay in sync with our Model at all times. An important concept, protocols, is covered in more detail as well as the basics about how to lay out Views in the UI.Slides
Grid enum Optionals
The survey of the Swift type system completes with a discussion of enum. An important language construct, Optionals, is both explained in slides and then demonstrated in Memorize as we fully implement the logic of the game.Assignment 2