April 2020
Beginner
316 pages
8h 20m
English
This is where things start to get exciting...
Let's start by taking a look at our SwiftUI View; you'll find this under the View group in the file tree:

First of all, let's take a look at the code in the body and go through exactly what's going on here:
var body: some View { List(model.articles) { article in VStack(alignment: .leading) { Text(article.title) Text(article.description) .foregroundColor(.secondary) } } }
Just after the body variable is declared, we see the List property being used, which requires a list (an array) of objects that we can iterate through. In this instance, we pass it a copy of our PostModelView ...
Read now
Unlock full access