hulab / ClusterKit

An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.
MIT License
512 stars 86 forks source link

Added an optional performCustomAnimations method in CKClusterManagerD… #80

Open aramsargsyan opened 4 years ago

aramsargsyan commented 4 years ago

This is an option for users of the library to implement animations in a custom way. Giving out the [CKClusterAnimation] array gives the possibility to implement the animations in any desirable way. I added another method in the delegate instead of changing the current one for the existing users of the library not to have to change much code.

maxep commented 3 years ago

Nice work here @aramsargsyan and sorry for the late reply.

Instead of adding the type as a CKClusterAnimation property, the enum value could be pass as an argument of the MKMap method performAnimations:completion:. Then the additional delegate method signature would look like:

- (void)clusterManager:(CKClusterManager *)clusterManager performAnimations:(void (^)(void))animations type:(CKClusterAnimationType)type completion:(void (^ __nullable)(BOOL finished))completion;

In order to be merged, you will also need to update MapKit, GoogleMaps and YandexMapKit extensions.