diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-07-08 12:41:34 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-07-08 14:39:27 -0700 |
commit | 49fe6df0dbcfb70222b10b72be681b68526e7891 (patch) | |
tree | b0b9f21008a94e0fbe6dc7b581c173d9b534d1de /platform | |
parent | a67e80219f90c409dfce8bfef91d9131dabd8d4f (diff) | |
download | qtlocation-mapboxgl-49fe6df0dbcfb70222b10b72be681b68526e7891.tar.gz |
Assert if -mapView:symbolNameForAnnotation: is implemented
Fixes #1851.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapView.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index f527a9a2e9..3fd0ed02c4 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -455,6 +455,14 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) if (_delegate == delegate) return; _delegate = delegate; + + if ([delegate respondsToSelector:@selector(mapView:symbolNameForAnnotation:)]) + { + [NSException raise:@"Method unavailable" format: + @"-mapView:symbolNameForAnnotation: has been removed from the MGLMapViewDelegate protocol, but %@ still implements it. " + @"Implement -[%@ mapView:imageForAnnotation:] instead.", + NSStringFromClass([delegate class]), NSStringFromClass([delegate class])]; + } } #pragma mark - Layout - |