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 | L2: Code Breaker App

Stanford Online, 1 hr 07, 33.5K views, Nov 14, 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 2nd lecture of the 2025 version of Stanford's CS193p course (developing applications for iOS using SwiftUI). Continues explanation of SwiftUI development by introducing View modifiers, the second major pillar of UI building, alongside Views. Demonstrates how View modifiers work as chainable functions that return modified Views, showing examples like .font(), .foregroundStyle(), and .padding(). Explains how modifiers are applied in order and can be passed down from container Views to their children. The lecture then dives into building the CodeBreaker app, creating and layout out the game's pegs, then building the markers using Shapes with modifiers like .fill(), .stroke(), and .opacity(). Covers creating custom structs that behave like Views, moving Views to separate files, using enums (for match states like exact, inexact, nomatch), and introduces functional programming concepts like count(where:) for Array processing. The lecture emphasizes decomposition as crucial for code maintainability and compiler performance. Paul Hegarty is a Lecturer who has been teaching CS193p at Stanford since 2010.