summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-11-20 21:51:24 -0800
committerMinh Nguyễn <mxn@1ec5.org>2015-11-20 21:51:24 -0800
commitc054441071d3ed050fb2a8ff393913aadf83cea7 (patch)
treeffce342c1aac2a2d59ac8a15e587be25c0569cda /include
parent24136b02e94ade8e64b2a5740beb5150f4e23da4 (diff)
downloadqtlocation-mapboxgl-c054441071d3ed050fb2a8ff393913aadf83cea7.tar.gz
Fixed linker warnings about overridden styleURL__
Replaced #3088 with a better fix that relies on Interface Builder’s lack of support for conditional compilation.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLMapView+IBAdditions.h4
-rw-r--r--include/mbgl/ios/MGLMapView.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/include/mbgl/ios/MGLMapView+IBAdditions.h b/include/mbgl/ios/MGLMapView+IBAdditions.h
index 52d5d433b6..f18df56e01 100644
--- a/include/mbgl/ios/MGLMapView+IBAdditions.h
+++ b/include/mbgl/ios/MGLMapView+IBAdditions.h
@@ -14,12 +14,16 @@ NS_ASSUME_NONNULL_BEGIN
// inspectables declared in MGLMapView.h are always sorted before those in
// MGLMapView+IBAdditions.h, due to ASCII sort order.
+#if TARGET_INTERFACE_BUILDER
+
// HACK: We want this property to look like a URL bar in the Attributes
// inspector, but just calling it styleURL would violate Cocoa naming
// conventions and conflict with the existing NSURL property. Fortunately, IB
// strips out the two underscores for display.
@property (nonatomic, nullable) IBInspectable NSString *styleURL__;
+#endif // TARGET_INTERFACE_BUILDER
+
// Convenience properties related to the initial viewport. These properties
// are not meant to be used outside of Interface Builder. latitude and longitude
// are backed by properties of type CLLocationDegrees, but these declarations
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h
index 83ef395cf9..779faa4e9b 100644
--- a/include/mbgl/ios/MGLMapView.h
+++ b/include/mbgl/ios/MGLMapView.h
@@ -234,9 +234,6 @@ IB_DESIGNABLE
* To display the default style, set this property to `nil`. */
@property (nonatomic, null_resettable) NSURL *styleURL;
-/* Discourage programmatic usage of this IB-only property. Interface Builder skips over this declaration because it is unable to parse attributes. See the real declaration in MGLMapView+IBAdditions.h. */
-@property (nonatomic, nullable) IBInspectable NSString *styleURL__ __attribute__((unavailable("styleURL__ is for use within Interface Builder only. Use styleURL in code.")));
-
/** Currently active style classes, represented as an array of string identifiers. */
@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses;