I'm trying to add custom clusters to my map by using MKClusterAnnotation.To do that, I configure a subclass of MKAnnotationView and inside of it I configure the cluster itself. After that, I register my cluster in map view's view controller by this code (ClusterView is an MKAnnotationView subclass where I define my cluster):
mapView.register(ClusterView.self, forAnnotationViewWithReuseIdentifier: MKMapViewDefaultClusterAnnotationViewReuseIdentifier)
The problem is, I see the standard clusters on my map. None of the methods inside of the ClusterView class gets called (breakpoints don't fire inside of the class). The code for registering the cluster view doesn't get called, too. For that reason, I think there is something wrong with registering my subclass, but I don't see what. I've also tried to follow the code from WWDC 2017 "What's new in MapKit" session's example, but that didn't help. I don't use Map View's delegate method for clusters, because I want only one type of a cluster. However, I do use delegate methods for my annotation views, because they differ. Maybe, because of that I should also use delegate methods for clusters? If that is the case, how can I use them to add my custom clusters? There is almost nothing on the Internet about adding clusters to a map view by using MKClusterAnnotation, so I don't know what to do. Do you have any ideas what could be wrong?