Created
June 9, 2019 16:54
-
-
Save bdotdub/5e16a407431e33bf37623045b7d453d5 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
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