Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit b3ea068

Browse files
committed
Assert if -mapView:symbolNameForAnnotation: is implemented
Fixes #1851.
1 parent aa51c15 commit b3ea068

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

platform/ios/MGLMapView.mm

+8
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,14 @@ - (void)setDelegate:(nullable id<MGLMapViewDelegate>)delegate
455455
if (_delegate == delegate) return;
456456

457457
_delegate = delegate;
458+
459+
if ([delegate respondsToSelector:@selector(mapView:symbolNameForAnnotation:)])
460+
{
461+
[NSException raise:@"Method unavailable" format:
462+
@"-mapView:symbolNameForAnnotation: has been removed from the MGLMapViewDelegate protocol, but %@ still implements it. "
463+
@"Implement -[%@ mapView:imageForAnnotation:] instead.",
464+
NSStringFromClass([delegate class]), NSStringFromClass([delegate class])];
465+
}
458466
}
459467

460468
#pragma mark - Layout -

0 commit comments

Comments
 (0)