...
|
...
|
@@ -377,21 +377,21 @@ |
|
|
|
|
|
[operation setCompletionBlock:^(void)
|
|
|
{
|
|
|
dispatch_sync(dispatch_get_main_queue(), ^(void)
|
|
|
if ( ! [internalOperation isCancelled])
|
|
|
{
|
|
|
if ( ! [internalOperation isCancelled])
|
|
|
{
|
|
|
progTile++;
|
|
|
progTile++;
|
|
|
|
|
|
if ([_backgroundCacheDelegate respondsToSelector:@selector(tileCache:didBackgroundCacheTile:withIndex:ofTotalTileCount:)])
|
|
|
{
|
|
|
[_backgroundCacheDelegate tileCache:weakSelf
|
|
|
didBackgroundCacheTile:RMTileMake((uint32_t)x, (uint32_t)y, zoom)
|
|
|
withIndex:progTile
|
|
|
ofTotalTileCount:totalTiles];
|
|
|
}
|
|
|
if ([_backgroundCacheDelegate respondsToSelector:@selector(tileCache:didBackgroundCacheTile:withIndex:ofTotalTileCount:)])
|
|
|
{
|
|
|
[_backgroundCacheDelegate tileCache:weakSelf
|
|
|
didBackgroundCacheTile:RMTileMake((uint32_t)x, (uint32_t)y, zoom)
|
|
|
withIndex:progTile
|
|
|
ofTotalTileCount:totalTiles];
|
|
|
}
|
|
|
|
|
|
if (progTile == totalTiles)
|
|
|
if (progTile == totalTiles)
|
|
|
{
|
|
|
dispatch_async(dispatch_get_main_queue(), ^(void)
|
|
|
{
|
|
|
[weakSelf markCachingComplete];
|
|
|
|
...
|
...
|
@@ -399,9 +399,9 @@ |
|
|
{
|
|
|
[_backgroundCacheDelegate tileCacheDidFinishBackgroundCache:weakSelf];
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
|
|
|
[_backgroundFetchQueue addOperation:operation];
|
...
|
...
|
|