2020
The lectures for the Spring 2020 version of Stanford University's course CS193p (Developing Applications for iOS using SwiftUI) are archived here. They are all now completely out of date and you'll want to go to the Spring 2023 version instead.
For more about CS193p at Stanford, 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.
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.
ViewBuilder Shape ViewModifier
Access Control. More about drawing, including the @ViewBuilder construct for expressing a conditional list of Views, the Shape protocol for custom drawing and ViewModifier, a mechanism for making incremental modifications to Views.
Multithreading EmojiArt
A brand new demo, EmojiArt, is embarked upon, starting off with a review of MVVM and then employing API such as ScrollView, UIImage and Drag & Drop. After the concept of multithreading is covered, it is used to prevent blocking the UI while fetching a background image from the network.
Data Flow
Property wrappers (like @Published, @EnvironmentObject, @Binding) are discussed along with Publishers. EmojiArt then uses these to autosave itself and to support choosing between multiple palettes of emoji.
Enroute Picker
The first of (the final) four lectures to cover topics for students to use in their final projects. Picker. Introduction of the Enroute demo code-base.
Persistence
CloudKit and filesystem access. Store EmojiArt documents in the filesystem.