Rich Text in SwiftUI with AttributedString | SwiftData | WWDC 2025 | TextEditor | Note App Tutorial

Опубликовано: 26 Март 2026
на канале: Think Like an Engineer
3,641
68

Learn how to use Rich Text support in SwiftUI with SwiftData, introduced at Apple’s latest WWDC event!
In this quick and focused tutorial, we’ll build a simple note-taking app to demonstrate how to store and edit styled text using the new AttributedString features in SwiftUI.

What you'll learn in this video:
✅ How to use AttributedString with SwiftData
✅ Why and when to use .externalStorage
✅ Setting up a SwiftData model for rich text
✅ Creating a Rich Text Editor using TextEditor
✅ Listing and editing notes in a SwiftUI app
✅ Swipe-to-delete functionality
✅ Using NavigationSplitView for iPad-friendly layout
✅ Testing in both Canvas and Simulator

This is a great starting point if you want to build your own Notes app, journal, or any app that needs styled text!

Related Videos:
Want to enable iCloud sync for your SwiftData model?
📌    • How to Configure a Model Container for iCl...  
📌    • How to Deploy Your Database Schema for iCl...  


Chapters:
00:00 What We’ll Cover
00:21 Creating the Model with AttributedString, @Attribute, and External Storage
01:48 Setting Up the Model Container
02:04 Using TextEditor
02:27 Building the UI with NavigationSplitView, ModelContext, List, and ForEach in SwiftUI
04:11 Adding an In-Memory Model Container for Canvas Previews
04:40 Implementing Swipe Actions in SwiftUI
05:06 Testing Rich Text Features in the iPad Canvas
05:50 Testing Rich Text Features on iPhone Simulator (iOS 26)


🎬 Watch until the end to see everything working on the iPhone Simulator!

🔔 Subscribe for more iOS development tips, SwiftUI tutorials, and app-building guides!
👍 Like the video to support the channel!

#SwiftUI #SwiftData #RichText #WWDC2025 #iOSDevelopment #AttributedString #XcodeTutorial #NoteApp #SwiftUI2025 #WWDC