diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2019-01-25 16:43:43 -0800 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2019-01-25 16:43:43 -0800 |
commit | b8e21444dca7a677106be08c3766d6cc44f27255 (patch) | |
tree | 763dcc1372f7d9422d574b385276cba550729f89 | |
parent | 9922073963ae52a627fea6d1972acbbc7daf38bb (diff) | |
download | qtlocation-mapboxgl-upstream/fabian-deactivate-inspectables-13424.tar.gz |
[ios] Remove IBDesignable agent code.upstream/fabian-deactivate-inspectables-13424
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 12 | ||||
-rw-r--r-- | platform/ios/src/MGLSDKUpdateChecker.mm | 3 |
2 files changed, 5 insertions, 10 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index bef4773b2f..04cf70b210 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -288,7 +288,6 @@ public: /// True if a willChange notification has been issued for shape annotation layers and a didChange notification is pending. BOOL _isChangingAnnotationLayers; BOOL _isWaitingForRedundantReachableNotification; - BOOL _isTargetingInterfaceBuilder; CLLocationDegrees _pendingLatitude; CLLocationDegrees _pendingLongitude; @@ -390,14 +389,12 @@ public: } NSString *styleURLString = @(self.mbglMap.getStyle().getURL().c_str()).mgl_stringOrNilIfEmpty; - MGLAssert(styleURLString || _isTargetingInterfaceBuilder, @"Invalid style URL string %@", styleURLString); + MGLAssert(styleURLString, @"Invalid style URL string %@", styleURLString); return styleURLString ? [NSURL URLWithString:styleURLString] : nil; } - (void)setStyleURL:(nullable NSURL *)styleURL { - if (_isTargetingInterfaceBuilder) return; - if ( ! styleURL) { styleURL = [MGLStyle streetsStyleURLWithVersion:MGLStyleDefaultVersion]; @@ -432,7 +429,6 @@ public: - (void)commonInit { - _isTargetingInterfaceBuilder = NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent; _opaque = NO; BOOL background = [UIApplication sharedApplication].applicationState == UIApplicationStateBackground; @@ -474,7 +470,7 @@ public: _mbglMap = new mbgl::Map(*_rendererFrontend, *_mbglView, self.size, config.scaleFactor, *[config fileSource], *_mbglThreadPool, mbgl::MapMode::Continuous, mbgl::ConstrainMode::None, mbgl::ViewportMode::Default, enableCrossSourceCollisions); // start paused if in IB - if (_isTargetingInterfaceBuilder || background) { + if (background) { self.dormant = YES; } @@ -1051,7 +1047,7 @@ public: [self adjustContentInset]; - if (!_isTargetingInterfaceBuilder && _mbglMap) { + if (_mbglMap) { self.mbglMap.setSize([self size]); } @@ -5145,7 +5141,7 @@ public: - (void)setShowsUserLocation:(BOOL)showsUserLocation { MGLLogDebug(@"Setting showsUserLocation: %@", MGLStringFromBOOL(showsUserLocation)); - if (showsUserLocation == _showsUserLocation || _isTargetingInterfaceBuilder) return; + if (showsUserLocation == _showsUserLocation) return; _showsUserLocation = showsUserLocation; diff --git a/platform/ios/src/MGLSDKUpdateChecker.mm b/platform/ios/src/MGLSDKUpdateChecker.mm index c41fc51ac5..e40a31a225 100644 --- a/platform/ios/src/MGLSDKUpdateChecker.mm +++ b/platform/ios/src/MGLSDKUpdateChecker.mm @@ -7,8 +7,7 @@ + (void)checkForUpdates { #if TARGET_IPHONE_SIMULATOR // Abort if running in a playground. - if ([[NSBundle mainBundle].bundleIdentifier hasPrefix:@"com.apple.dt.playground."] || - NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent) { + if ([[NSBundle mainBundle].bundleIdentifier hasPrefix:@"com.apple.dt.playground."]) { return; } |