mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-03-26 19:31:20 +01:00
Update
This commit is contained in:
36
Other Projects/SwiftUI + Redux/SwiftUIDemo/views/map/MapView.swift
Executable file
36
Other Projects/SwiftUI + Redux/SwiftUIDemo/views/map/MapView.swift
Executable file
@@ -0,0 +1,36 @@
|
||||
|
||||
//
|
||||
// MapVie.swift
|
||||
// SwiftUIDemo
|
||||
//
|
||||
// Created by Thomas Ricouard on 05/06/2019.
|
||||
// Copyright © 2019 Thomas Ricouarf. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
import MapKit
|
||||
|
||||
struct MapViewRepresentable: UIViewRepresentable {
|
||||
func makeUIView(context: Context) -> MKMapView {
|
||||
return MKMapView()
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: MKMapView, context: Context) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
struct MapView : View {
|
||||
var body: some View {
|
||||
MapViewRepresentable()
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct MapVie_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
MapView()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user