Authored by Justin R. Miller

improvements to asset assertions

... ... @@ -21,7 +21,8 @@
if (self)
{
NSAssert([[NSBundle mainBundle] pathForResource:@"LoadingTile" ofType:@"png"], @"Unable to find necessary graphical assets (copy from framework 'Resources' folder)");
RMRequireAsset(@"LoadingTile.png");
RMRequireAsset(@"LoadingTileZoom.png");
_contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width * 3, frame.size.height * 3)];
[self addSubview:_contentView];
... ...
... ... @@ -2638,6 +2638,12 @@
if (newShowsUserLocation)
{
RMRequireAsset(@"HeadingAngleSmall.png");
RMRequireAsset(@"TrackingDot.png");
RMRequireAsset(@"TrackingDotHalo.png");
RMRequireAsset(@"TrackingHeading.png");
RMRequireAsset(@"TrackingLocation.png");
if (_delegateHasWillStartLocatingUser)
[_delegate mapViewWillStartLocatingUser:self];
... ...
... ... @@ -21,8 +21,6 @@
if ( ! (self = [super initWithMapView:aMapView coordinate:aCoordinate andTitle:aTitle]))
return nil;
NSAssert([[NSBundle mainBundle] pathForResource:@"TrackingDot" ofType:@"png"], @"Unable to find necessary graphical assets (copy from framework 'Resources' folder)");
layer = [[RMMarker alloc] initWithUIImage:[UIImage imageNamed:@"TrackingDot.png"]];
layer.zPosition = -MAXFLOAT + 2;
... ...
... ... @@ -24,3 +24,4 @@
#define NS_BLOCK_ASSERTIONS 1
#endif
#define RMRequireAsset(asset) NSAssert([[NSBundle mainBundle] pathForResource:[asset stringByReplacingOccurrencesOfString:[@"." stringByAppendingString:[asset pathExtension]] withString:@""] ofType:[asset pathExtension]], @"Unable to find %@ (copy from framework 'Resources' folder)", asset);
... ...