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

Commit

Permalink
[ios] Replaced MGLMapView redeclaration with internal header
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Apr 18, 2016
1 parent d86e732 commit 2784222
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
16 changes: 1 addition & 15 deletions platform/ios/benchmark/MBXBenchViewController.mm
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
#import "MBXBenchViewController.h"

#import <Mapbox/Mapbox.h>
#import "MGLMapView_Internal.h"

#include "locations.hpp"

#include <chrono>

@interface MGLMapView (MBXBenchmarkAdditions)

#pragma mark - Debugging

/** Triggers another render pass even when it is not necessary. */
- (void)setNeedsGLDisplay;

/** Returns whether the map view is currently loading or processing any assets required to render the map */
- (BOOL)isFullyLoaded;

/** Empties the in-memory tile cache. */
- (void)didReceiveMemoryWarning;

@end

@interface MBXBenchViewController () <MGLMapViewDelegate>

@property (nonatomic) MGLMapView *mapView;
Expand Down
6 changes: 6 additions & 0 deletions platform/ios/ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
DA17BE301CC4BAC300402C41 /* MGLMapView_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */; };
DA17BE311CC4BDAA00402C41 /* MGLMapView_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */; };
DA1DC96A1CB6C6B7006E619F /* MBXCustomCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA1DC9671CB6C6B7006E619F /* MBXCustomCalloutView.m */; };
DA1DC96B1CB6C6B7006E619F /* MBXOfflinePacksTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA1DC9691CB6C6B7006E619F /* MBXOfflinePacksTableViewController.m */; };
DA1DC9701CB6C6CE006E619F /* points.geojson in Resources */ = {isa = PBXBuildFile; fileRef = DA1DC96C1CB6C6CE006E619F /* points.geojson */; };
Expand Down Expand Up @@ -239,6 +241,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLMapView_Internal.h; path = src/MGLMapView_Internal.h; sourceTree = "<group>"; };
DA1DC94A1CB6C1C2006E619F /* Mapbox GL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mapbox GL.app"; sourceTree = BUILT_PRODUCTS_DIR; };
DA1DC9501CB6C1C2006E619F /* MBXAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBXAppDelegate.h; sourceTree = "<group>"; };
DA1DC9531CB6C1C2006E619F /* MBXViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBXViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -591,6 +594,7 @@
DA8848481CBAFB9800AB86E3 /* MGLMapboxEvents.h */,
DA8848491CBAFB9800AB86E3 /* MGLMapboxEvents.m */,
DA8848361CBAFB8500AB86E3 /* MGLMapView.h */,
DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */,
DA8848371CBAFB8500AB86E3 /* MGLMapView+IBAdditions.h */,
DA8848381CBAFB8500AB86E3 /* MGLMapView+MGLCustomStyleLayerAdditions.h */,
DA88484A1CBAFB9800AB86E3 /* MGLMapView.mm */,
Expand Down Expand Up @@ -735,6 +739,7 @@
DA8848551CBAFB9800AB86E3 /* MGLLocationManager.h in Headers */,
DA88483F1CBAFB8500AB86E3 /* MGLUserLocation.h in Headers */,
DA88483D1CBAFB8500AB86E3 /* MGLMapView+IBAdditions.h in Headers */,
DA17BE301CC4BAC300402C41 /* MGLMapView_Internal.h in Headers */,
DA88481E1CBAFA6200AB86E3 /* MGLMultiPoint_Private.h in Headers */,
DA8847F71CBAFA5100AB86E3 /* MGLOverlay.h in Headers */,
DA88488B1CBB037E00AB86E3 /* SMCalloutView.h in Headers */,
Expand Down Expand Up @@ -772,6 +777,7 @@
DABFB8721CBE9A0F00D62B32 /* MGLUserLocation.h in Headers */,
DABFB8661CBE99E500D62B32 /* MGLPointAnnotation.h in Headers */,
DABFB8621CBE99E500D62B32 /* MGLOfflinePack.h in Headers */,
DA17BE311CC4BDAA00402C41 /* MGLMapView_Internal.h in Headers */,
DABFB86C1CBE99E500D62B32 /* MGLTypes.h in Headers */,
DABFB8691CBE99E500D62B32 /* MGLShape.h in Headers */,
DABFB8701CBE9A0F00D62B32 /* MGLMapView+IBAdditions.h in Headers */,
Expand Down
4 changes: 1 addition & 3 deletions platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#import "MGLMapView.h"
#import "MGLMapView+IBAdditions.h"
#import "MGLMapView+MGLCustomStyleLayerAdditions.h"
#import "MGLMapView_Internal.h"

#import <mbgl/platform/log.hpp>
#import <mbgl/gl/gl.hpp>
Expand Down
14 changes: 14 additions & 0 deletions platform/ios/src/MGLMapView_Internal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#import <Mapbox/Mapbox.h>

@interface MGLMapView (Internal)

/** Triggers another render pass even when it is not necessary. */
- (void)setNeedsGLDisplay;

/** Returns whether the map view is currently loading or processing any assets required to render the map */
- (BOOL)isFullyLoaded;

/** Empties the in-memory tile cache. */
- (void)didReceiveMemoryWarning;

@end

0 comments on commit 2784222

Please sign in to comment.