- Creating a custom component with @Binding
- Accepting multi-line text input with TextEditor
- Introduction to SwiftData and SwiftUI
- Building a list with @Query
- Sorting SwiftData queries using SortDescriptor
- Deleting from a SwiftData query
- Using an alert to pop a NavigationLink programmatically
CHALLENGE
- Right now it’s possible to select no title, author, or genre for books, which causes a problem for the detail view Please fix this, either by forcing defaults, validating the form, or showing a default picture for unknown genres – you can choose.
- Modify ContentView so that books rated as 1 star are highlighted somehow, such as having their name shown in red.
- Add a new “date” attribute to the Book class, assigning Date.now to it so it gets the current date and time, then format that nicely somewhere in DetailView.