Composing the Restaurant Detail screen

You now have the following SwiftUI components: a view displaying the name and location of a restaurant, a view displaying a circular image, and a view displaying a map. Now, you'll combine them to create the final design for the Restaurant Detail screen. Perform the following steps:

  1. Click the ContentView.swift file in the Project navigator.
  2. Modify your code as shown to embed the VStack that holds the three text views in another VStack:
var body: some View {    VStack {        VStack(alignment: .leading) {            Text("The Tap Trailhouse")                .font(.title)            HStack(alignment: .top) {                Text("17 Union St")                    .font(.subheadline)                Spacer()                Text("Boston")                    .font(.subheadline)            }        }        .padding()    }}
  1. Modify your code to add your custom ...

Get iOS 13 Programming for Beginners - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.