Today you’re going to build a complete app using
UserDefaults, and more. I realize that seems like a lot, but I want you to try to think about all the things that are happening in the background:
@Publishedpublishes change announcements automatically.
@ObservedObjectwatches for those announcements and refreshes any views using the object.
sheet()watches a condition we specify and shows or hides a view automatically.
Codablecan convert Swift objects into JSON and back with almost no code from us.
UserDefaultscan read and write data so that we can save settings and more instantly.
Yes, we need to write the code to put those things in place, but so much boilerplate code has been removed that what remains is quite remarkable. As French writer and poet Antoine de Saint-Exupery once said, “perfection is achieved not when there is nothing more to add, but rather when there is nothing more to take away.”
Today you have five topics to work through, in which you’ll learn about
onDelete(), and more.
That’s another app built, and lots more techniques used in context too – great job!
Need help? Tweet me @twostraws!
SPONSORED From August 2nd to 8th you can join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer!
Link copied to your pasteboard.