Created
July 8, 2021 14:53
-
-
Save Toni77777/878dbf5e496128c1f9dc2ffa4a1f3561 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 ContentView: View { | |
@State var countries: [Country] = [] // Data source | |
var body: some View { | |
EmptyList(countries, // Data items | |
listRowView: { country in // List row view | |
Text(country.name) | |
.font(.title) | |
}, placeholderView: { | |
Text("No Countries") // Placeholder | |
.font(.largeTitle) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment