Created
July 8, 2021 14:55
-
-
Save Toni77777/5049eed610a033350a2b28ac3ae2c6ab 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 { | |
List(countries) { country in | |
Text(country.name) | |
.font(.title) | |
} | |
.modifier(EmptyDataModifier( | |
items: countries, | |
placeholder: Text("No Countries").font(.title)) // Placeholder | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment