Creating the products
Now that we have completed our basic structure, let's move on to getting the products to display next. Let's take a look at what we need to create for our products section:
For each product, we have the product image, the name of the shoe, and the price. Let's create this now by creating a new SwiftUI file called ProductView
and save it to the Product
folder, inside the Supporting Views
folder. Next, open ProductView
and replace Text(“Hello, world!”)
with the following:
ZStack(alignment: .bottom) { Rectangle() .foregroundColor(Color.white) .frame(minWidth: 200) .frame(height: 110) .cornerRadius(10) VStack(spacing: 0) { &...