Skip to content

Instantly share code, notes, and snippets.

@bdotdub
Created June 9, 2019 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdotdub/5e16a407431e33bf37623045b7d453d5 to your computer and use it in GitHub Desktop.
Save bdotdub/5e16a407431e33bf37623045b7d453d5 to your computer and use it in GitHub Desktop.
import PlaygroundSupport
import SwiftUI
struct CityRow: View {
var body: some View {
Text(place)
}
var place: String
}
struct PlacesView: View {
var body: some View {
List {
CityRow(place: "New York")
CityRow(place: "San Francisco")
}
}
}
PlaygroundPage.current.liveView = UIHostingController(rootView: PlacesView())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment