From 69954525419b66ebae09ac21914342c31dfad190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Thu, 28 Jan 2016 22:36:58 -0800 Subject: [PATCH] [ios] Restored toggleDebug Restored (but deprecated) a method removed in #3100 to avoid a major version bump. --- include/mbgl/ios/MGLMapView.h | 2 +- platform/ios/src/MGLMapView.mm | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 46383ed13..ed0327ea2 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -956,7 +956,7 @@ IB_DESIGNABLE @property (nonatomic, getter=isDebugActive) BOOL debugActive __attribute__((deprecated("Use -debugMask and -setDebugMask:."))); -- (void)cycleDebugOptions __attribute__((deprecated("Use -setDebugMask:."))); +- (void)toggleDebug __attribute__((deprecated("Use -setDebugMask:."))); /** Empties the in-memory tile cache. diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index c5abf5a60..dfac4db86 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1697,6 +1697,11 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) return self.debugMask; } +- (void)toggleDebug +{ + self.debugActive = !self.debugActive; +} + - (void)resetNorth { [self resetNorthAnimated:YES]; @@ -1714,11 +1719,6 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) self.camera = camera; } -- (void)cycleDebugOptions -{ - _mbglMap->cycleDebugOptions(); -} - - (void)emptyMemoryCache { _mbglMap->onLowMemory();