Created
July 9, 2020 15:00
-
-
Save gavi/37212123681a58fa60af4633be65ecd0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MapKit | |
import SwiftUI | |
import PlaygroundSupport | |
struct ContentView:View{ | |
var body:some View{ | |
VStack{ | |
Text("Hello, World") | |
MapView() | |
} | |
} | |
} | |
struct MapView:UIViewRepresentable{ | |
func makeUIView(context: Context) -> MKMapView{ | |
let view = MKMapView(frame: CGRect.zero) | |
return view | |
} | |
func updateUIView(_ map: MKMapView, context: Context) { | |
map.mapType = .hybridFlyover | |
} | |
} | |
let contentView = ContentView() | |
PlaygroundPage.current.setLiveView(contentView) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment