Created
October 11, 2022 07:26
-
-
Save Rusti18/3ad93b299479222551fa52807ea9a8ca to your computer and use it in GitHub Desktop.
SwiftUIPT-Ep2-G8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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