Ich habe eine einfache Kartenansicht:Warum clusterAnnotationForMemberAnnotations in MKMapView nicht aufgerufen wird?
@IBOutlet private var mapView: MKMapView!
Dann eins nach dem anderen I Anmerkungen hinzufügen:
mapView.addAnnotation(Annotation(user: user))
und zeigen sie alle:
mapView.showAnnotations(mapView.annotations, animated: true)
I implementiert auch das Verfahren:
func mapView(_ mapView: MKMapView, clusterAnnotationForMemberAnnotations memberAnnotations: [MKAnnotation]) -> MKClusterAnnotation {
print(memberAnnotations)
return MKClusterAnnotation(memberAnnotations: memberAnnotations)
}
aber das wird überhaupt nicht aufgerufen. Warum?
Das gleiche heute im iOS 11.2-Simulator bemerkt. Deklariert, dass die umschließende Klasse der Delegat ist, aber es scheint einfach nicht zu funktionieren. – edwardmp