From 9586e6608f664d83c6e7894c0e287eb7871089c1 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Tue, 27 Nov 2018 11:52:43 -0800 Subject: [ios] Fix automatical dismissal when tapping. --- platform/ios/src/MGLMapView.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 8ab612663..0ea8c234e 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1772,7 +1772,13 @@ public: } else if (self.selectedAnnotation) { - [self deselectAnnotation:self.selectedAnnotation animated:YES]; + BOOL deselect = YES; + if ([self.selectedAnnotation respondsToSelector:@selector(dismissesAutomatically)]) { + deselect = [self.selectedAnnotation performSelector:@selector(dismissesAutomatically)]; + } + if (deselect) { + [self deselectAnnotation:self.selectedAnnotation animated:YES]; + } } } -- cgit v1.2.3