Today we’re going to be continuing our look at SwiftUI’s navigation by moving beyond the basics – how to handle programmatic navigation, but also how to load and save navigation paths so you can restore your app's state.
That last part is a small but important part of app development, but sadly too many developers just don't take the time to get it right. Think about it: you use an app for a while, you navigate to something precise, and then you leave the app for a while to do something else. Wouldn't it be nice if things just came back as they were when you relaunched the app later on, even if "later on" actually means a few days later?
This is just one of today's topics, and I hope you take the time to get it right. As Ralph Waldo Emerson once said, “we aim above the mark to hit the mark" – it's always a good thing to do the best you can, because if you fall short you'll still be in a great place!
Anyway, enough chat – let’s get to it!
Today you have four topics to work through, in which you’ll learn about programmatic navigation, NavigationPath
, Codable
support, and more.
Great job on finishing another day! If you still have questions about what you learned, please send them in using this form – I'll do my best to address the most common problems in the next course update. Thank you!
If you use Twitter, the button below will prepare a tweet saying you completed today, along with a celebratory graphic, the URL to this page, and the challenge hashtag. Don't worry – it won't be sent until you confirm on Twitter!
Alternatively, copy and paste the text below to your preferred social network - I'm @twostraws on Mastodon.social, Bluesky, and Threads.
🎉 I just finished Day 44 of the #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/44 via @twostraws
Need help? Tweet me @twostraws!
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's all new Paywall Editor allow you to remotely configure your paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
The 100 Days of SwiftUI is a free collection of videos, tutorials, tests, and more to help you learn SwiftUI faster. Click here to learn more, or watch the video below.
Link copied to your pasteboard.