April 2020
Beginner
316 pages
8h 20m
English
With our new view all done and ready to go, you'll notice that we've added a couple of new properties to our view, so our Helper and RecipeModel struct will need updating so that we can view this in an automatic previewer. Make the following highlighted changes to the RecipeModel.swift file:
struct RecipeModel: Identifiable, Codable { var id = UUID() var name = "" var origin = "" var countryCode = "" var favourite = false var ingredients = [String]() var recipe = "" }
As per the logic in our picker, the ingredients property will be a list of strings (basically a list of our ingredients) and recipe will be our actual recipe instructions.
Now, it's time to update our Helper function, so head on over to Helper.swift
Read now
Unlock full access