Mastering SwiftUI Previews: How the Project Structure can hel
summary
Argues that reorganizing code into Swift packages and small, composable views plus separating data and logic yields much faster, reliable SwiftUI previews: preview builds shrink, previews avoid real API or DB access by injecting mocks instead of API calls, and Xcode 15 surfaces preview errors more clearly. Describes a custom per-view, Redux-like state pattern with optional injected logic, shows examples of previewing all dynamic type and color-scheme variants, and reports this approach reduces iteration time and catches edge states.
AI-written summary · about
chapters (7)
- 0:00Introduction and background
- 2:34SwiftUI Previews challenges
- 4:46Advantages of SwiftUI Previews
- 6:20Reducing preview complexity
- 9:35Architecture for SwiftUI Previews
- 12:04Key takeaways and conclusion
- 13:29Q&A session
related talks
46mPreviews and Package Oriented Programming
20mSpeeding up UIKit-based app development with Xcode Previews
28mElevating your design with SwiftUI
31m5 Steps to Better SwiftUI Views
46mSqueezing Even More Out of SwiftUI Preview
26mThe SwiftUI Mindset: 5 Key Ideas to Avoid Common Pitfalls
49mWhy SwiftUI?
27mCode organization strategies for complex globalization in Swift
