summaryrefslogtreecommitdiff
path: root/platform/macos
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2019-06-18 12:13:43 -0700
committerJason Wray <jason@mapbox.com>2019-06-26 12:18:22 -0700
commit8a9567e072e09a2f5a6da95a2a2ce56b2f05a79b (patch)
tree628295b3f2e1db11f39c0f688a6c65fb16828374 /platform/macos
parenta16c67d953926bd9b86359316b983d01825fd0f2 (diff)
downloadqtlocation-mapboxgl-8a9567e072e09a2f5a6da95a2a2ce56b2f05a79b.tar.gz
[ios, macos] Deprecate methods in favor of new completion handler versions
Diffstat (limited to 'platform/macos')
-rw-r--r--platform/macos/src/MGLMapView.h6
-rw-r--r--platform/macos/src/MGLMapView.mm3
2 files changed, 4 insertions, 5 deletions
diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h
index fbe57524b8..f5fcee5b25 100644
--- a/platform/macos/src/MGLMapView.h
+++ b/platform/macos/src/MGLMapView.h
@@ -626,8 +626,8 @@ MGL_EXPORT IB_DESIGNABLE
@property (nonatomic, assign) NSEdgeInsets contentInsets;
/**
- Sets the distance from the edges of the map view’s frame to the edges of the
- map view’s logical viewport, with an optional transition animation.
+ Deprecated. Sets the distance from the edges of the map view’s frame to the
+ edges of the map view’s logical viewport, with an optional transition animation.
When the value of this property is equal to `NSEdgeInsetsZero`, viewport
properties such as `centerCoordinate` assume a viewport that matches the map
@@ -646,7 +646,7 @@ MGL_EXPORT IB_DESIGNABLE
the content insets or `NO` if you want the map to inset the content
immediately.
*/
-- (void)setContentInsets:(NSEdgeInsets)contentInsets animated:(BOOL)animated;
+- (void)setContentInsets:(NSEdgeInsets)contentInsets animated:(BOOL)animated __attribute__((deprecated("Use `-setContentInsets:animated:completionHandler:` instead.")));
/**
Sets the distance from the edges of the map view’s frame to the edges of the
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index ad3d1eee51..75bdaac080 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -1431,8 +1431,7 @@ public:
}
- (void)setContentInsets:(NSEdgeInsets)contentInsets {
- MGLLogDebug(@"Setting contentInset: %@", MGLStringFromNSEdgeInsets(contentInsets));
- [self setContentInsets:contentInsets animated:NO];
+ [self setContentInsets:contentInsets animated:NO completionHandler:nil];
}
- (void)setContentInsets:(NSEdgeInsets)contentInsets animated:(BOOL)animated {