Summary
In this chapter, we took the basic structure of our app to the next level. We started by creating another View, which took data that we selected from a list in our previous view. We looked at how we can reuse our mock data to make working on the preview provider a much easier (and more beneficial experience).
Next, we introduced ourselves to navigation and how the navigation stack works within mobile apps. We hooked up our new and existing Views, which allowed us to interact between the two.
Finally, we learned how to use EnvironmentObject to inject and give us a global object that can be used anywhere in our app. We then modified our logic to make use of our new environment, reducing the need for us to use our previously written ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access