Make Your SwiftUI Design System Portable with Swift Packages
summary
Shows how to package a SwiftUI design system as a local Swift package and reuse it across multiple iOS apps by placing fonts and asset catalogs in the package resources, registering fonts with FontManager, and wiring a SunfishFont enum into an overloaded Font.custom + view modifier so the syntax matches Apple’s. Extends Color/ShapeStyle so Apple modifiers like foreground, background, fill and strokeBorder accept custom colors and builds a custom fill-with-stroke modifier that composes stroke and background. Creates separate workspace schemes to test the package in previews.
AI-written summary · about
chapters (10)
- 0:00Introduction and welcome
- 2:39Talk overview and goals
- 6:57Setting up Swift package and project
- 9:02Creating custom fonts
- 13:44Applying custom fonts to text
- 14:06Creating custom colors
- 19:56Applying custom colors to text
- 20:18Applying custom colors to shapes
- 25:15Resources and references
- 26:46Q&A session
related talks
36mSwiftUI Everywhere
27mCode organization strategies for complex globalization in Swift
27mReusable UI components with SwiftUI
28mElevating your design with SwiftUI
46mPreviews and Package Oriented Programming
44mSwift Packages - Dependency Management of the Future
26mKeeping Things Modular With Swift Package Manager
23mUsing SwiftUI as a Language
