Skip to main content
  1. SwiftUI in 100 Days Notes/

Day 59 - SwiftUI Project-12 Challenge and Solutions

Table of Contents

While this is just an introduction to what SwiftData can do, you’ve seen how it can add, delete, sort, filter and more with relatively simple code. Yes, some parts of Swift are a bit fuzzy - #Predicate, for example, can take some getting used to - but as long as you’re careful, you should be fine.

Perhaps the most important thing about SwiftData is that it is guaranteed to be there for all applications on all of Apple’s platforms. This means you can use it for whatever your needs are: maybe it’s for saving important data, maybe it’s just a cache of the content you download; it doesn’t matter, because SwiftData will do a great job of managing it for you.

Challenge #

All three of these challenges are related to your upgrade of project-7, iExpense:

  1. Start by upgrading to use SwiftData.
  2. Add a customizable sort order option: by name or by amount.
  3. Add a filter option to show all expenses, only personal expenses or only business expenses.

Solutions #

The code for the completed project for the above three items is available in the following github repository.

GitHub - GorkemGuray/iExpense at Day59_Challange_1


You can also read this article in Turkish.
Bu yazıyı Türkçe olarak da okuyabilirsiniz.

This article contains the notes I took for myself from the articles found at SwiftUI Day 59. Please use the link to follow the original lesson.