この機能を有効にする方法を見つけ出すことはできません。私は機能を持つアプリを作っています
func RMC(_ manager: CLLocationManager, locations: [CLLocation]) {
let manager = CLLocationManager()
let location = locations[0]
let span:MKCoordinateSpan = MKCoordinateSpanMake(0.001, 0.001)
let myLocation:CLLocationCoordinate2D = CLLocationCoordinate2DMake(location.coordinate.latitude, location.coordinate.longitude)
let region:MKCoordinateRegion = MKCoordinateRegionMake(myLocation, span)
let annotation = MKPointAnnotation()
annotation.coordinate = location.coordinate
mapView.setRegion(region, animated: true)
self.mapView.addAnnotation(annotation)
annotation.title = "My Car"
そして、私はこのコードで@IBA機能でそれをアクティブにする:
RMC(CLLocationManager, locations: [CLLocation])
それは、このエラーを思い付く:
は予想引数の型を「CLLocationManager.Typeは」「CLLocationManager」
助けてください型の値を変換できません!