Add Custom Fonts to Your iOS App | Xcode + SwiftUI + UIKit Tutorial

Опубликовано: 25 Апрель 2025
на канале: NDC
38
1

Want to add a custom font to your iOS app?
In this video, we walk through the entire process of adding a Google Font to your Xcode project — and using it in both SwiftUI and UIKit.

Google Fonts: https://fonts.google.com/

📄 You’ll Learn:
✅ How to download and register custom fonts
✅ How to use .custom(_:size:relativeTo:) in SwiftUI
✅ How to apply the font programmatically in UIKit
✅ How to verify your font is working with console logs
✅ Why you can’t use custom fonts in Interface Builder

🔥 Bonus: We’ll use Poppins from Google Fonts and show off the difference between system fonts and custom fonts side by side.

👨‍💻 Full Code Available:
https://ndcswift.github.io/Swift-Proj...

💬 Drop your favorite Google Font in the comments
👍 Like & Subscribe for more Swift + Xcode content!

⏱️Timestamps
0:00 - Into & What we'll build
0:35 - Downloading Custom Fonts (Google Fonts)
1:08 - Installing font + Fontbook
1:43 - Xcode project setup (SwiftUI)
1:54 - Adding font to Xcode
2:30 - Adding font to Info.plist (IMPORTANT!)
3:21 - Displaying the font in our views
4:16 - Scaling font in SwiftUI
5:40 - Adding Custom font to UIKit
6:14 - Limitation of Interface Builder
7:45 - Adding it pragmatically in ViewController
10:10 - Quick Test
10:39 - Extra tip: Checking Available Fonts