Assert if -mapView:symbolNameForAnnotation: is implemented

Fixes #1851.
This commit is contained in:
Minh Nguyễn
2015-07-08 12:41:34 -07:00
parent aa51c15670
commit b3ea068e5d

View File

@@ -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 -