Initial support for list views 

Start by returning the simulator to portrait mode and then head on over to ContentView.swift. We want to add the following modifier to our NavigationView:

.navigationViewStyle(StackNavigationViewStyle())

Setting navigationViewStyle to StackNavigationViewStyle() will tell our app to support ContentView by a view stack that only shows a single top view at a time, according to Apple's official SDK documentation. 

Go ahead and rerun the simulator. You should see things start to look a little more as we would expect now:

With that change made, let's see how the rest of our app runs. Go ahead and click on a recipe ...

Get Learn SwiftUI now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.