I was going thru the apple swiftui course (https://developer.apple.com/tutorials/swiftui/creating-and-combining-views)
and when i was creating a view for the apple map i got this error:
swift:19:35: error: argument passed to call that takes no arguments
Map(coordinateRegion: $region)
import SwiftUI
import MapKit
struct Map: View {
@State private var region = MKCoordinateRegion(
center: CLLocationCoordinate2D(latitude: 34.011_286, longitude: -116.116_868),
span: MKCoordinateSpan(latitudeDelta: 0.2, longitudeDelta: 0.2)
)
var body: some View {
Map(coordinateRegion: $region)
}
}
struct Map_Previews: PreviewProvider {
static var previews: some View {
Map()
}
}
Can someone help me with this problem
Selecting any option will automatically load the page