Congratulations on finishing another SwiftUI project! With technologies like Core Data at your side, you’re now capable of building some serious apps that interact with the user and – most importantly – remember what they entered. Although we only scratched the surface or Core Data, it’s capable of a lot more and I expect Apple to keep expanding the link between Core Data and SwiftUI in future updates. In the meantime, the very next project focuses deeply on Core Data – there’s lots to explore!
As for the other things you learned, you’ve now even more of SwiftUI’s property wrappers, and I hope you’re getting a sense for which one to choose and when.
@Binding is particularly useful when building custom UI components, because its ability to share data between views is just so useful.
There’s one last thing I’d like to leave you with, and it’s something you might not even have noticed. When we built a star rating component, we created something that became a user-interactive control just like
Slider. However, we didn’t stop to consider how it works with accessibility and that’s a problem:
Slider, and others work great of the box, but as soon as we start creating our own components we need to step in and do that work ourselves.
Building apps that are accessible for everyone is something everyone needs to take seriously, which is why I’ve dedicated a whole technique project to it in the future – we’re going to be looking back at the previous projects we’ve made and seeing how we can improve them.
Anyway, first things first – you have a new review and some challenges. Good luck!
Anyone can sit through a tutorial, but it takes actual work to remember what was taught. It’s my job to make sure you take as much from these tutorials as possible, so I’ve prepared a short review to help you check your learning.
Click here to review what you learned in this project.
One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try extending this app to make sure you fully understand what’s going on.
ContentViewso that books rated as 1 star are highlighted somehow, such as having their name shown in red.
Date.nowto it so it gets the current date and time, then format that nicely somewhere in
Hacking with Swift+ subscribers can get a complete video solution for this checkpoint here: Solution to Bookworm. If you don’t already subscribe, you can start a free trial today.
SAVE 50% To celebrate WWDC23, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
Link copied to your pasteboard.