Deepwatch

Keyboard shortcuts

Space or k
Play or pause
j and l
Back or forward 10 seconds
Left and right arrows
Back or forward 5 seconds
f
Fullscreen
m
Mute or unmute
Shift and < or >
Slower or faster
n
Next lecture
?
Show or hide this list

Stanford CS193p: iOS Development with SwiftUI | 2025 | L7: Animation

Stanford Online, 1 hr 07, 7.9K views, Dec 3, 2025

Show description

View course details: https://online.stanford.edu/courses/cs193p-ios-application-development All course materials are available at https://cs193p.stanford.edu. The 7th lecture of the 2025 version of Stanford's CS193p course (developing applications for iOS using SwiftUI). Generics and custom View modifiers. Refactors the CodeView to accept any ancillary View (like MatchMarkers or guess buttons) using generics with constraints (AncillaryView: View). Demonstrates how to pass an @Binding parameter to a View's init, implementing @ViewBuilder support for flexible content, and using @escaping for closures that outlive their calling function. Other topics include fileprivate structs, trailing closure syntax with multiple closures, generic type constraints with where clauses, and how SwiftUI's built-in Views like VStack implement similar patterns. Paul Hegarty is a Lecturer who has been teaching CS193p at Stanford since 2010.