Mit dieser einfachen Funktion kann man einen Pin zur MapView hinzufügen.
func addPin(latitude: Double, longitude: Double, title: String, subtitle: String) { let annotation = MKPointAnnotation() let centerCoordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude) annotation.coordinate = centerCoordinate annotation.title = title annotation.subtitle = subtitle mapView.addAnnotation(annotation) }

Über den Autor