Hello! I'm trying to add some additional alpha animation to collapsing annotationViews animation, but it seems CKClusterManagerDelegate doesn't provide proper methods to do this. By using 'clusterManager performAnimations' delegate method I can only manipulate animation code blocks but not the annotations that are going to animate.
I found a workaround for expanding animation simply by animate alpha separately in mapView(_ mapView: MKMapView, didAdd views: [MKAnnotationView]):
func mapView(_ mapView: MKMapView, didAdd views: [MKAnnotationView]) { views.forEach { (annotation) in annotation.alpha = 0.01 UIView.animate(withDuration: 0.5, animations: { annotation.alpha = 1.0 }) } }
But I can't found a workaround for fade out animation on collapsing.
I need this because I have different shapes of annotationViews and the collapse animation because of that, looks a little bit weird.
Please, add the ability to customise animations.
Hello! I'm trying to add some additional alpha animation to collapsing annotationViews animation, but it seems CKClusterManagerDelegate doesn't provide proper methods to do this. By using 'clusterManager performAnimations' delegate method I can only manipulate animation code blocks but not the annotations that are going to animate. I found a workaround for expanding animation simply by animate alpha separately in
mapView(_ mapView: MKMapView, didAdd views: [MKAnnotationView])
:func mapView(_ mapView: MKMapView, didAdd views: [MKAnnotationView]) { views.forEach { (annotation) in annotation.alpha = 0.01 UIView.animate(withDuration: 0.5, animations: { annotation.alpha = 1.0 }) } }
But I can't found a workaround for fade out animation on collapsing. I need this because I have different shapes of annotationViews and the collapse animation because of that, looks a little bit weird. Please, add the ability to customise animations.