Skip to content

Instantly share code, notes, and snippets.

@Toni77777
Created July 8, 2021 14:55
Show Gist options
  • Save Toni77777/5049eed610a033350a2b28ac3ae2c6ab to your computer and use it in GitHub Desktop.
Save Toni77777/5049eed610a033350a2b28ac3ae2c6ab to your computer and use it in GitHub Desktop.
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