Last active
February 7, 2021 16:50
-
-
Save below/750544c10d9be8d3095581949d122927 to your computer and use it in GitHub Desktop.
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 TeamMemberView: View { | |
var columns: [GridItem] = | |
Array(repeating: .init(.flexible()), count: 2) | |
var body: some View { | |
ScrollView { | |
LazyVGrid(columns: columns, alignment: .leading) { | |
Text("Name:") | |
Text("Anne Applebaum") | |
Text("Contact:") | |
Text("+1-415-555-1111, [email protected]").lineLimit(0) | |
}.padding() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure what the goal is but I think there might be a better way to go about this. If you have a TeamMember model you want to be repeated, then maybe something like this will work better?
Option 1 - Using String Interpolation
Option 2 - Format individual Text views
Option 3 - Imitates columns