Putting Everything Together to Build a Personal Finance App
By now, you should have a good understanding of SwiftUI and have built some simple apps using this new framework. In this chapter, you will use what you have learned so far to develop a personal finance app, enabling users to track their income and expenses.
This app is not too complicated to build but you will learn quite a lot about SwiftUI and understand how to apply the techniques you learned in developing this real-world app. In brief, here are some of the topics we will cover:
- How to build a form and perform validation
- How to filter records and refresh the list view
- How to use bottom sheet to display record details
- How to use MVVM (Model-View-ViewModel) in SwiftUI
- How to save and manage data in a database using Core Data
- How to use DatePicker for date selection
- How to handle keyboard notification and adjust the form position
Let me stress this once again. This app is the result of what you have learned so far. Therefore, I assume you have already read the book from chapter 1 to chapter 24. You should understand how a bottom sheet is built (chapter 18), how form validation with Combine works (chapter 14 & 15), and how to persist data using SwiftData (chapter 22). If you haven't read these chapters, I suggest you go read them first. In this chapter, we will primarily focus on techniques that haven't been discussed before.
To access the full content and the complete source code, please get your copy at https://www.appcoda.com/swiftui.