How to test methods while Coding Swift File

During the article " Cookcademy 1 - Build the Recipe Model"

Under the subtitle " Adding a Description Property"

The exercise require us to create and instance of an ingredient and print it to the console. How do I do that?

Hi, I managed to solve that using the ContentView.swift file that is created one you create your project. I declared the variable using the examples provided in the article and then called it’s value from the Text in the body, where by default you have “Hello World” displayed.

Did you have issues with the next article? I just can’t get the list items to open the RecipeDetailView using the NavigationLink. I even used the download files at the end of the reading and had the same issue.

1 Like