Skip to content

Instantly share code, notes, and snippets.

@Rusti18
Created October 11, 2022 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rusti18/3ad93b299479222551fa52807ea9a8ca to your computer and use it in GitHub Desktop.
Save Rusti18/3ad93b299479222551fa52807ea9a8ca to your computer and use it in GitHub Desktop.
SwiftUIPT-Ep2-G8
struct BusinessCardList_Scroll: View {
let viewModels = [
BusinessCardViewModel(
imageName: "man",
name: "Jack Doe",
occupation: "Plumber",
workplace: "Plumbers LLC"
),
BusinessCardViewModel(
imageName: "man",
name: "John Doe",
occupation: "Dentist",
workplace: "Dentists LLC"
)
]
var body: some View {
ScrollView {
VStack {
ForEach(viewModels) { viewModel in
BusinessCard(viewModel: viewModel)
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment