私は、単純なマップビューを持っている。そして、MKMapViewのclusterAnnotationForMemberAnnotationsが呼び出されないのはなぜですか?
@IBOutlet private var mapView: MKMapView!
一つ一つ私が注釈を追加:
mapView.addAnnotation(Annotation(user: user))
し、それらのすべてを示しています
mapView.showAnnotations(mapView.annotations, animated: true)
私もこの方法実装:
をfunc mapView(_ mapView: MKMapView, clusterAnnotationForMemberAnnotations memberAnnotations: [MKAnnotation]) -> MKClusterAnnotation {
print(memberAnnotations)
return MKClusterAnnotation(memberAnnotations: memberAnnotations)
}
しかし、これはまったく呼び出されません。どうして?
iOS 11.2シミュレータでも同じことが分かりました。含まれているクラスがデリゲートだと宣言しましたが、単に動作していないようです。 – edwardmp