Displaying the app container
We are going to approach the design of this app a little differently than we have before. Since we are creating our own custom split view, we are going to set up each side first, then add in the other elements after.
Let's look at what we are going to create first:
We have two sides to our app, along with a couple of icons. Let's get started by creating our custom split view first.
Creating a products header view
We are going to create a custom split view starting with the view on the left, which is what will hold our products. Create a new SwiftUI file named ProductsHeaderView
and save it in the Products
folder inside Supporting Views
.
In the body
variable, replace the Text
view with the following:
HStack { Spacer() Text(“KICKZ STORE”) .custom(font: .heavy, size: 30) Spacer() ...