In this video, we dive into swipe actions in SwiftUI, showing you how to add delete data functionality with SwiftData and more to our vocabulary notebook app.
You'll learn how to:
✅ Implement swipe actions to delete data from your SwiftData database.
✅ Add multiple swipe action buttons with custom icons and colors.
✅ Control swipe behavior, including disabling full swipe actions.
✅ Dynamically change icons based on variable states (e.g., favorite or notification toggles).
New to this project? Check out our previous videos to build your app from scratch:
📌 • Insert Data with SwiftData & SwiftUI - 1/9
📌 • Query Data with SwiftData | Get All Data, ...
📌 • Navigate between Views using NavigationLin...
📌 • Provide Sample Data for SwiftUI Previews |...
📌 • Edit Data with SwiftUI & SwiftData | Creat...
📌 • How to iCloud Sync SwiftData with CloudKit...
The app we’re building is perfect for language learners, allowing them to save, edit, and manage newly learned vocabulary.
If you're following along, don't forget to grab the sample data and reusable views tips from our earlier videos!
More from us:
📌 Essential Mac Software Installation Guides: • Essential Mac Software Installation Guides
📌 macOS Tips and Tricks: • MacOS Tips & Tricks | Apple Ecosystem
📌 Swift & iOS Development: • SwiftUI & SwiftData
Chapters:
00:00 Introduction
00:20 Recap of the Sample App
02:16 Add Swipe Action to the Right
03:41 Delete Data with SwiftData
04:06 Add Multiple Buttons in Swipe Actions
05:16 Add Swipe Actions to the Left
05:58 Disable Full Swipe
06:17 Change Icon with Variable
💡 Like this video if you found it helpful and subscribe for more easy-to-follow app development tutorials!
#SwipeActions #DeleteData #SwiftUI #SwiftData #iOSDevelopment