Я пытаюсь открыть разные местоположения в зависимости от количества ячеек в табличном представлении, поэтому я написал эту функцию:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let latitude: CLLocationDegrees = self.latitudes[indexPath.row]
let longitude: CLLocationDegrees = self.longitude[indexPath.row]
let coordinate = CLLocationCoordinate2DMake(latitudes,longitude)
let mapItem = MKMapItem(placemark: MKPlacemark(coordinate: coordinate, addressDictionary:nil))
mapItem.openInMaps(launchOptions: [MKLaunchOptionsDirectionsModeKey : MKLaunchOptionsDirectionsModeDriving])
}
Но Xcode выдает мне эту ошибку "Не могупреобразовать значение типа «[CLLocationDegrees]» (иначе «Array») в ожидаемый тип аргумента «CLLocationDegrees» (иначе «Double») "
Кто-нибудь знает, что мне делать?