Hello!) Tell me why the location display does not work in the simulator?And how to fix the problem?
Thanks!
Thanks!
Code Block import SwiftUI import MapKit struct ContentView: View { @State private var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 34.002871, longitude: -118.157545), span: MKCoordinateSpan(latitudeDelta: 0.03, longitudeDelta: 0.03)) @State private var trackingMode = MapUserTrackingMode.follow var body: some View { Map(coordinateRegion: $region, interactionModes: .all, showsUserLocation: true, userTrackingMode: $trackingMode) } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }