display map

i'm trying to display a map with the user location's. I created a file named MapViewController.swift which contains the map, the user location function etc... But when I start the app it still starts the ContentView.swift, So how can I import the mapviewcontroller into the contentview?

 I created a file named MapViewController.swift

it still starts the ContentView.swift

Seems you created two different types of codes, UIKit and SwiftUI.

Are you using MKMapView in MapViewController? Is MapViewController a subclass of UIViewController?
In SwiftUI, you usually use Map, do you have any View (not UIViewController) using Map?

You should better show your code.
display map
 
 
Q