April 2020
Beginner
316 pages
8h 20m
English
We'll start by creating a new SwiftUI View. We'll create a new file in our Xcode project called RecipeDetailView by highlighting the group name in the File Tree, then right-clicking and selecting New File. Select SwiftUI View from the User Interface options and click Next. Call your new file AddRecipeView.swift and click Create.
Next, we're going to add some text fields to our main View that will allow us to input text for our recipe name and ingredients. There are a couple of ways we could approach this, but the simplest way would be to make use of the form View in SwiftUI. Let's add a couple of forms and see how this looks:
Form { Section(header: Text("Add Recipe Name:")) { TextField("enter recipe name", ...Read now
Unlock full access