diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-11-27 11:52:43 -0800 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-11-27 11:52:43 -0800 |
commit | 9586e6608f664d83c6e7894c0e287eb7871089c1 (patch) | |
tree | b5d7c6207193fe9f349ce72b4336a7300cd4080d | |
parent | 9d1d4ecdb8bcbb10c8b1f3125ca2d78510856ce9 (diff) |
[ios] Fix automatical dismissal when tapping.upstream/fabian-dismiss-automatically
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 8 |
1 files changed, 7 insertions, 1 deletions
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]; + } } } |